react-animated-number
react-animated-number copied to clipboard
support for react 16.9/17.0
when using with react 16.9 we have this warning:
Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks 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: AnimatedNumber
Hey, @madmed88 @nanexcool @ameyms @phiresky @a-axton
As of React 16.9.x it seems the authors are beginning their transition to a full hooks or hooks preferred component strategy. This latest change requires that all componentWillMount, componentWillReceiveProps & componentWillUpdate calls, including those within bundle dependency packages, be prefixed with the UNSAFE_ prefix in order to dismiss the below console warnings. Of which, in my latest app where I'm using power-select I get about 4 per instance. I'd love to continue using react-animated-number for all my numerical needs, but have some stricter demands from my colleagues on console warnings, if you would kindly check into this, I'd be most appreciative. Thanks
Btw been a fan of your library for a years now and have used it in just about every react project I've worked on.
https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html
Hey, @madmed88 @nanexcool @ameyms @phiresky @a-axton
As of React 16.9.x it seems the authors are beginning their transition to a full hooks or hooks preferred component strategy. This latest change requires that all componentWillMount, componentWillReceiveProps & componentWillUpdate calls, including those within bundle dependency packages, be prefixed with the UNSAFE_ prefix in order to dismiss the below console warnings. Of which, in my latest app where I'm using power-select I get about 4 per instance. I'd love to continue using react-animated-number for all my numerical needs, but have some stricter demands from my colleagues on console warnings, if you would kindly check into this, I'd be most appreciative. Thanks
Btw been a fan of your library for a years now and have used it in just about every react project I've worked on.
https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html
We used https://www.npmjs.com/package/patch-package to cover packages who are not updated yet.
Hey @ameyms, is there interest in accepting a pull request to address this?
I also get this warning when using this component:
componentWillReceiveProps has been renamed, and is not recommended for use.