react-animated-css
react-animated-css copied to clipboard
Warning: componentWillReceiveProps has been renamed, and is not recommended for use ... Please update the following components: Animated
When using [email protected] (with react 16.10.2), I get this warning:
backend.js:6 Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.
* 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: Animated
If I drop react-animated-css from my project, the warning disappears.
What do you suggest me to do?
You are getting the warning because that lifecycle method is gonna be deprecated soon in the React framework. So you can use it for now just take notice of the react's change log before updating. I guess some cool contributor will submit a PR before that happens.
I tried solving the issue and created a pull request #30 . I don't know how to test it as a dist lib. Let's see if dev accepts or rectifies solution and merges.