componentWillReceiveProps is going to be deprecated
See original GitHub issueReact is going to deprecate componentWillReceiveProps in version 17 which will affect AnimatedSwitch
.
Do you have any plan to fix it?
I am not sure if you move the affected code into “componentDidUpdate” will cause any other trouble. There is another way “getDerivedStateFromProps” but that will force people to have react 16.3.0+ as peer dependency.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:5 (3 by maintainers)
Top Results From Across the Web
reactjs - why is componentWillReceiveProps deprecated?
Thus, componentWillReceiveProps is being deprecated in favor of the following reason: Use getDerivedStateFromProps. Or, use componentDidUpdate.
Read more >React17, or how to get rid of “componentWillReceiveProps”?
As you may already know, with the release of React 16.3, some of legacy lifecycles were deprecated. One of the biggest lessons we've...
Read more >Refactor componentWillReceiveProps() to ... - Egghead.io
The componentWillReceiveProps() method is being deprecated in future version of React (17). Many of us use this method day-to-day to check for incoming...
Read more >Replacing 'componentWillReceiveProps' with ... - Medium
With the release of React 16.3, some new lifecycle methods have been introduced, and release of React 17 will deprecate some lifecycle method....
Read more >React: componentWillMount to be deprecated! - Northcoders
getDerivedStateFromProps is going to handle what componentWillReceiveProps and componentDidUpdate did. After either a component is created or when it receives a ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This has been solved by #110 – let me know if you have any other concerns.
@maisano I am receiving a similar message: