Closed zhaopeifei closed 6 years ago
We are encountering the same issues with react-slick
. I created a fix for this issue in PR #495
Can confirm this is triggering errors in react-autocomplete
too.
@mlaursen suspects that findDOMNode
may also cause the incompatibility with react-md. I've made sure preact-compat is at 3.18.4 in my reproduction repo (linked above), but I still see the issue.
I added notes to the issue in react-md: findDOMNode is not causing the issue they are seeing, but rather a lower level preact bug.
function findDOMNode() { return e && e.base || null }
but in react-dom
function findDOMNode(componentOrElement) { // ... if (componentOrElement == null) { return null; } if (componentOrElement.nodeType === 1) { return componentOrElement; } // ...
so when I use findDOMNode(element),react-dom return element,but preact return null. This cause react-slick make a mistake.