Warning about `componentWillReceiveProps` in React's Strict Mode
See original GitHub issueReact’s Strict Mode warns about “Unsafe lifecycle methods were found within a strict-mode tree”.
componentWillReceiveProps
: Please update the following components to use static getDerivedStateFromProps instead.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:53
- Comments:9
Top Results From Across the Web
Strict Mode - React
Identifying components with unsafe lifecycles; Warning about legacy string ref API usage; Warning about deprecated findDOMNode usage; Detecting unexpected side ...
Read more >javascript - React warning for Using ... - Stack Overflow
This method is considered legacy, the alternative API is getDerivedStateFromProps. Here's a sample of what the old method would look like:
Read more >Using strict mode in React 18: A guide to its new behaviors
React's strict mode will now warn developers if they are using these deprecated APIs, such as componentWillMount , componentWillReceiveProps ...
Read more >How to use React Strict Mode in React 18 - Refine Dev
Legacy components such as componentWillMount, componentWillReceiveProps, and componentWillUpdate have been discovered to cause unhealthy code ...
Read more >What is StrictMode in React? - KnowledgeHut
For its descendant components, it activates additional deprecation checks and warnings. The fact that it gives visual feedback (warning/error ...
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 Free
Top 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
Any update on this @moroshko ?
Now with React 16.9 it’s even a non-strict mode warning …