You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
#748
Open
maaliHasan opened this issue
Oct 23, 2022
· 1 comment
Hi,
I'm using the latest stable version for RecyclerListView V4.2.0 and I got a lot of this waning Cox=sole message :
Please update the following components: RecyclerListView
Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/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://reactjs.org/link/derived-state
Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.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.
Note : running the command : npx react-codemod rename-unsafe-lifecycles in my project source folder didn't help me !
The text was updated successfully, but these errors were encountered:
These warnings are actually incorrect. We've moved away from these methods long time ago. Looks like lint is just looking for this text in functions.
We have a method called componentWillRecievePropsCompat which is triggering this. I can look into renaming it in the future.
Hi,
I'm using the latest stable version for RecyclerListView V4.2.0 and I got a lot of this waning Cox=sole message :
Please update the following components: RecyclerListView
Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
npx react-codemod rename-unsafe-lifecycles
in your project source folder.Note : running the command :
npx react-codemod rename-unsafe-lifecycles
in my project source folder didn't help me !The text was updated successfully, but these errors were encountered: