Skip to content

Unwanted warning componentWillMount has been renamed, and is not recommended for use. #3833

Description

@Jatin24062005

p5.js version

No response

What is your operating system?

None

Web browser and version

No response

Actual Behavior

I ran npm run test and the tests all passed ✅ …but the console threw up this React unsafe lifecycle warning ⚠️.
It’s complaining about componentWillMount being deprecated and suggesting migration to UNSAFE_componentWillMount or moving logic into componentDidMount. The warning points to SideEffect(NullComponent) as the culprit.
So while the tests are green, the warning is a reminder that we’ve got some legacy lifecycle methods lurking in the codebase that could cause trouble down the line.
Image

Expected Behavior

It should pass all the Test cases without throwing any warning specially not unsafe one.

Steps to reproduce

Steps:

  1. clone this repository
  2. run npm install
  3. run npm run test

Snippet:

// Paste your code here :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugError or unexpected behaviorsHelp WantedWould love additional input or contributions!

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions