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.

Warnings: componentWillReceiveProps in strict mode, Legacy context API, findDOMNode is deprecated

See original GitHub issue

This issue is a round-up of multiple past issues documenting the same bug. Feel free to check out the linked issues below for more information. This issue is the source of truth going forward to investigate the issue, report findings, and implement a bug fix.

Issue:

W35yYs
Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details.
Warning: Legacy context API has been detected within a strict-mode tree.

The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of NodeResolver which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://fb.me/react-strict-mode-find-node

Issues:

https://github.com/JedWatson/react-select/issues/3751 https://github.com/JedWatson/react-select/issues/3720 https://github.com/JedWatson/react-select/issues/3915 https://github.com/JedWatson/react-select/issues/3745 https://github.com/JedWatson/react-select/issues/4068 https://github.com/JedWatson/react-select/issues/3703

If anyone would like to share any further information, please do so.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:81
  • Comments:20 (1 by maintainers)

github_iconTop GitHub Comments

136reactions
corysimmonscommented, Jul 20, 2020

For anyone else going insane over this, you can disable those warnings (and other, actually helpful ones) by commenting out <React.StrictMode> in index.js. Just remember to uncomment it a few times a day to get the helpful warnings.


Update: Stop confused-face’ing me you monsters! 😭

31reactions
ljharbcommented, Oct 24, 2020

The UNSAFE removal has been deferred to React 18.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using strict mode in React 18: A guide to its new behaviors
React's strict mode warns the developers to either use a callback pattern or a more modern createRef API instead. Warnings about deprecated ......
Read more >
Strict Mode - React
StrictMode currently helps with: Identifying components with unsafe lifecycles; Warning about legacy string ref API usage; Warning about deprecated findDOMNode ...
Read more >
Warning: findDOMNode is deprecated in StrictMode ...
Warning about deprecated findDOMNode usage; Detecting unexpected side effects; Detecting legacy context API. As the error backtrace is not fully ...
Read more >
What is StrictMode in React? - KnowledgeHut
What Does Strict Mode Help With? · Identifying Unsafe Lifecycles · Warning About Legacy String ref API Usage · Warning About Deprecated findDOMNode...
Read more >
How to use React Strict Mode in React 18 - Refine Dev
Identifying components with unsafe lifecycles in React · Warning About Legacy String Ref API Usage · Warning about deprecated findDOMNode usage ...
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