-
Notifications
You must be signed in to change notification settings - Fork 196
Open
Description
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.
However, reading through the source code I see that VisibilitySensor is not rendering any DOM nodes itself, so I'm not sure what would be the best way to attach the ref.
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.
Metadata
Metadata
Assignees
Labels
No labels