You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
An RFC for fragment refs has been created (reactjs/rfcs#97).
If this RFC is approved, implement and merged, then it will likely give styled-components the ability to stop relying on findDOMNode in React versions that support the above feature.
Now that StrictMode has been enabled for the site, the following warning is logged to the console:
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.
The text was updated successfully, but these errors were encountered: