Warnings: componentWillReceiveProps in strict mode, Legacy context API, findDOMNode is deprecated
See original GitHub issueThis 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:
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:
- Created 3 years ago
- Reactions:81
- Comments:20 (1 by maintainers)
Top 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 >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 FreeTop 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
Top GitHub Comments
For anyone else going insane over this, you can disable those warnings (and other, actually helpful ones) by commenting out
<React.StrictMode>
inindex.js
. Just remember to uncomment it a few times a day to get the helpful warnings.Update: Stop confused-face’ing me you monsters! 😭
The UNSAFE removal has been deferred to React 18.