question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unsafe Lifecycle warning in React >= 16.3

See original GitHub issue

Version

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:closed
  • Created 5 years ago
  • Reactions:59
  • Comments:15 (9 by maintainers)

github_iconTop GitHub Comments

11reactions
mjacksoncommented, Sep 25, 2018

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! 😅

4reactions
grzegorzjudascommented, Jul 9, 2018

Is there a PR to fix this?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found