react-positioning-portal icon indicating copy to clipboard operation
react-positioning-portal copied to clipboard

findDOMNode is deprecated in StrictMode

Open jroboyd opened this issue 3 years ago • 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

jroboyd avatar Apr 09 '21 15:04 jroboyd

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.

webholics avatar Apr 12 '21 12:04 webholics