codastic/react-positioning-portal

findDOMNode is deprecated in StrictMode

jroboyd opened this issue · 1 comments

Hi I like the component, getting this warning however:

Warning: findDOMNode is deprecated in StrictMode

I think they want you to use refs, I see in the code you have marked is a difficult issue, I think it might be possible using this method:

https://stackoverflow.com/questions/29568721/getting-dom-node-from-react-child-element

Hi, thank you for your interest in this library.

We are aware that in principle this is solvable with React refs. However this would require all childs of the positioning portal to also forward the ref to the appropriate DOM element which would be quite a breaking change. Also we don't want to inject an additional <div /> as a wrapper because this brings opinion into styling.

For now we didn't find a good solution to this issue.