schovi / react-iscroll

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

"findDOMNode was called on an unmounted component" #47

Closed notatestuser closed 7 years ago

notatestuser commented 7 years ago

The stack trace follows:

Invariant Violation: findDOMNode was called on an unmounted component.
  at message(~/react/lib/reactProdInvariant.js:32:0)
  at r(~/react/lib/findDOMNode.js:54:0)
  at this(~/react-iscroll/dist/react-iscroll.js:152:0)
  at _runInitializeIScroll(~/react-iscroll/dist/react-iscroll.js:184:0)
  at this(~/raven-js/src/raven.js:278:0)

I'm guessing that this has something to do with the fact that initialisation is done within a setTimeout. Do you think we could verify that the component is mounted before this happens?

schovi commented 7 years ago

Fixed with https://github.com/schovi/react-iscroll/commit/7b556e3f3526a4a5c37b3eb9cc376efb225e059a

notatestuser commented 7 years ago

Thank you for fixing & publishing this!