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.

Warning about `componentWillReceiveProps` in React's Strict Mode

See original GitHub issue

React’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.

https://github.com/moroshko/react-autosuggest/blob/d626cef720df0ed5a4c7df4d539836b86bda6afa/src/Autosuggest.js#L124-L143

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:53
  • Comments:9

github_iconTop GitHub Comments

26reactions
Kove11commented, Aug 12, 2019

Any update on this @moroshko ?

26reactions
ulrichbcommented, Aug 9, 2019

Now with React 16.9 it’s even a non-strict mode warning …

Read more comments on GitHub >

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

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