Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

findDOMNode will be deprecated #209

Closed
dsempel opened this issue Oct 25, 2018 · 5 comments · Fixed by #242
Closed

findDOMNode will be deprecated #209

dsempel opened this issue Oct 25, 2018 · 5 comments · Fixed by #242

Comments

@dsempel
Copy link

dsempel commented Oct 25, 2018

Starting from React 16.6 it is deprecated in StrictMode and it will be deprecated from React in the future. Here is some more information about this.

The docs state the following:

Normally you don’t need this because you can attach a ref directly to a DOM node.

The warning in StrictMode:

Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of VisibilitySensor which is inside StrictMode. Instead, add a ref directly to the element you want to reference.

@jasonslyvia
Copy link
Collaborator

Maybe we should implement some ref pass through technique to bypass this issue? The DOM node should be accessed anyway though.

@sjsn
Copy link

sjsn commented Aug 12, 2019

@ameerthehacker Any news on when #242 will make it into an npm release? The build files in 2.6.2 still have the findDOMNode code.

@pelotom
Copy link

pelotom commented Oct 31, 2019

bump

It would be great if we could get a release with this fix!

@rafaelcamaram
Copy link

I do believe that it's an important fix that needs to be accomplished. These warn are being very annoying.

@ameerthehacker
Copy link
Collaborator

@rafaelcamaram I totally understand it, the fix has been in beta for few weeks now already and I will release it tomorrow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants