schovi / react-iscroll

React component for wrapping iScroll http://iscrolljs.com/
MIT License
236 stars 60 forks source link

Replace ReactDOM.findDOMNode() with ref. #71

Closed syedirashid closed 5 years ago

syedirashid commented 5 years ago

Replaced findDOMNode with refs which is a more explicit and preferred method of accessing underlying DOM nodes. See:

https://reactjs.org/docs/react-dom.html#finddomnode https://reactjs.org/docs/strict-mode.html#warning-about-deprecated-finddomnode-usage https://github.com/yannickcr/eslint-plugin-react/issues/678

Incidentally, this also resolves issue #70 where the "Unable to find node on an unmounted component" exception is thrown possibly due to different libraries using different versions of react-dom in the same project.

syedirashid commented 5 years ago

Awesome. @D-TUCKER are you able to publish the latest to npm?

D-TUCKER commented 5 years ago

Hmm good question. I don't have access to do that right now. I assume @schovi will either need to do it or give me access to do it.