React Warning: componentWillReceiveProps has been renamed, and is not recommended for use.
josdejong opened this issue · comments
Jos de Jong commented
This library works like a charm Kabir, thanks for sharing!
I noticed one React deprecation warning when using the library:
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: FileDrop
It would be great if you can update the library not to use this deprecated method anymore. If needed I may be able to create a PR for this.
Kabir Sarin commented
We have #47 for this, but I'm still waiting for an answer to a question on one of the lines on that PR
Jos de Jong commented
Ah, I had missed that one! Thanks. I hope the PE will be merged soon. Will close this issue now since it is a duplicate.