Unsafe Lifecycle warning in React >= 16.3
See original GitHub issueVersion
react-router@create-context-api react@16.3 under React.StrictMode
Steps to reproduce
use react-router under React.StrictMode
Expected Behavior
without warning
Actual Behavior
warning for componentWillReceiveProps componentWillMount
Issue Analytics
- State:
- Created 5 years ago
- Reactions:59
- Comments:15 (9 by maintainers)
Top Results From Across the Web
Unsafe Lifecycle warning in React >= 16.3 #6060 - GitHub
There are no opportunity to do the second check. So i think to move history listener to another component. Then we can have....
Read more >React v16.3.0: New lifecycles and context API
Identifying components with unsafe lifecycles; Warning about legacy string ref API usage; Detecting unexpected side effects. Additional ...
Read more >Problematic React Lifecycle Methods are Going Away in ...
The above lifecycle methods are categorized as unsafe in the 16.3 release. Deprecation warnings will be added to the legacy methods in the...
Read more >Unsafe legacy lifecycle methods should not ... - Rule | DeepScan
This rule applies when unsafe legacy lifecycle methods are defined together with newly added replacements. In React v16.3, ...
Read more >What is StrictMode in React? - KnowledgeHut
Identifying Unsafe Lifecycles ... The React APIs saw several significant modifications in version 16.3.0. Fall of lifecycle methods like ...
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

This is fixed in master. You can see some of my commits here and here.
You can expect a new beta release sometime this week! 😅
Is there a PR to fix this?