-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
upstreamThe issue is dependent on an upstream issueThe issue is dependent on an upstream issue
Description
Now that StrictMode has been enabled for the site, the following warning is logged to the console:
Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of StyledComponent which is inside StrictMode. Instead, add a ref directly to the element you want to reference.
This is because as mentioned in styled-components/styled-components#2154 (comment), there is no other suitable alternative to the findDOMNode method currently in React for styled-components' use case. The React team have said that they are thinking about implementing a solution for this unhandled use case (facebook/react#13841 (comment)).
For now, nothing can be done, as styled-components is waiting on React to implement a solution. This issue is here as a reference to explain why this error is logged to the console in dev mode.
Metadata
Metadata
Assignees
Labels
upstreamThe issue is dependent on an upstream issueThe issue is dependent on an upstream issue