Code base needs to be modernized to drop findDOMNode and string refs
See original GitHub issueThe following lint issues had to be disabled in order to maintain long backward compatibility to React 16.0:
- react/no-find-dom-node: Suggested solution is to use callback refs.
- react/no-render-return-value: See deprecation warning. Suggested solution is to use callback refs.
- react/no-string-refs: Suggested solution is to use callback refs.
TL/DR: Using callback refs should clear all these up.
Sooner or later, however, these issues will have to be rectified in order for the code to be compatible with the next major release of React, at which point, we’ll have to drop support for < React 16.3 which is when React.createRef()
and callback refs were introduced (AFAICT).
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:6 (4 by maintainers)
Top Results From Across the Web
React.StrictMode throws warning because of `findDOMNode ...
I think we will drop findDOMNode only when ref for Fragments be implemented ... So, in styled-components code, we need to find DOM...
Read more >Warning: findDOMNode is deprecated in StrictMode ...
The findDOMNode error looks like it's happening inside a library, it's not in your code. That is not a relevant warning for your...
Read more >Refs and the DOM - React
Refs provide a way to access DOM nodes or React elements created in the render method. In the typical React dataflow, props are...
Read more >Using strict mode in React 18: A guide to its new behaviors
In this article, you'll learn about Strict Mode, its various features, and how the v18 release has improved its API.
Read more >This One Line Of Code Catches React Bugs For You - YouTube
FREE React Hooks Simplified Course: https://courses.webdevsimplified.com/react-hooks-simplifiedStrictMode in React was a bit controversial ...
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
@m7kvqbe1 Thanks for letting me know. As it stands, this would be the next priority to work on for this project, provided nothing more urgent arises in the meantime. I can’t make promises on a timeline, however. Just hopefully “soon”. Issues on focus-trap and tabbable could also detract from this, but as of this past Thursday, I think I finally got all 3 in a good place again. 😅
Look for a fix to this (I hope!!) in v9.0.0 being published right now.