Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended #36

Open
florence-henry opened this issue Oct 21, 2021 · 0 comments

Comments

@florence-henry
Copy link

Hello

I get this warning since I upgraded React to v17 :

Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended 
and may indicate bugs in your code. 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

Please update the following components: Month

Here is the code to reproduce it :

https://codesandbox.io/s/bug-yearly-izs2q

Is there any plan to remove this warning ?

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

No branches or pull requests

1 participant