Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning with componentWillMount, componentWillReceiveProps and componentWillUpdate #136

Open
ByteDecoder opened this issue Oct 17, 2020 · 4 comments

Comments

@ByteDecoder
Copy link

ByteDecoder commented Oct 17, 2020

Hi there, I am using React 16.14 and I am getting some warnings warning in the console using the MaskInput component. Warnings:

  • Warning: componentWillMount has been renamed, and is not recommended for use.
  • Warning: componentWillReceiveProps has been renamed, and is not recommended for use.
  • Warning: componentWillUpdate has been renamed, and is not recommended for use.

This is the all the info:

  • Move data fetching code or side effects to componentDidUpdate.
  • If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
  • Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run npx react-codemod rename-unsafe-lifecycles in your project source folder.

Please update the following components: MaskedInput

Does this is already solved?

@icorradi
Copy link

icorradi commented Dec 4, 2020

+1

2 similar comments
@unimatrix2
Copy link

+1

@EzequielBurg
Copy link

+1

@dyouberg
Copy link

Bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants