Viktor Havrylin
Viktor Havrylin
@optunetobi I have tried to replace findDOMNode with ref. I made it like it described in following issue https://github.com/facebook/react/issues/13029, but it doesn't work for cases with functions like `styled(() =>...
I think we will drop findDOMNode only when ref for Fragments be implemented. See https://github.com/facebook/react/pull/13841#issuecomment-430066195
@Kovensky I believe that such cases are quite rare, so you can disable warning with `suppressClassNameWarning` prop.
@zaguiini Deprecating of `findDOMNode` in Strict mode is not only our pain. Third party libraries actively use it. For example: https://github.com/mui-org/material-ui/issues/13394, https://github.com/jasonslyvia/react-lazyload/issues/209, https://github.com/akiran/react-slick/issues/1406, https://github.com/reactjs/react-transition-group/issues/429, https://github.com/necolas/react-native-web/issues/1151
@exogen I was thinking about this approach. However, it’s not enough for cases when portals with locally created iframes are used.
This warning is not about that you are using className prop name in your code. It search in nesting children to sure that you have a real DOM node which...
There is only one problem with this warning when asynchronous rendering is used. I have some ideas and will try to make some solution to handle it.
@probablyup sure, will add this today
It is because of async render while `componentDidMount` is executed in synchronous way. So there can be two options: 1. Add some timeout in `componentDidMount` https://github.com/styled-components/styled-components/blob/v4.0.2/src/utils/classNameUseCheckInjector.js#L17 to wait for async...
@Pixelatex try upgrade to 4.1.1