boblauer / react-onclickout

An ES6-friendly on-click-outside React component.
MIT License
92 stars 14 forks source link

React 16 error #19

Closed chasedeanda closed 6 years ago

chasedeanda commented 7 years ago

Hello,

I'm trying to upgrade React to v.16 and I'm running into errors with this package. Getting this error: Uncaught Error: Unable to find node on an unmounted component. at var el = ReactDOM.findDOMNode(this); in the componentDidMount method. Have you been able to use this package with React 16? I'm wondering if it's an issue with the new version of React or my setup.

Thanks.

boblauer commented 7 years ago

It should work just fine with React 16, but it's still possible there has been some change introduced in 16 that is causing problems.

I'm wondering if you can reproduce the issue? I just tried a very simple scenario, and that is working, so I'm guessing you're doing something a bit more complex than this.

https://codesandbox.io/s/j7lx2l4kkv