omcljs / om

ClojureScript interface to Facebook's React
6.66k stars 362 forks source link

Bug on master: `mounted?` breaks in adv optimization #894

Open awkay opened 6 years ago

awkay commented 6 years ago

The hack into react internals isn't going to work at least with React 15.6. I fixed this in Fulcro 2.0 by reimplementing mounted via lifecycle hooks (componentDidMount and componentWillUnmount) instead of trying to look for private data on the React component internals.

See https://github.com/fulcrologic/fulcro/blob/d11725c456dc4b0d0f7a1b5cb9d14e5e4cb0dbf6/src/main/fulcro/client/primitives.cljc#L206

A similar patch should fix in on Om Next.