cerebral-legacy / cerebral-view-react

React View layer package for Cerebral
16 stars 9 forks source link

fix(eventListener): should listen to flush event on mount, not willmount #63

Closed christianalfoni closed 8 years ago

christianalfoni commented 8 years ago

We can not listen to "flush" on componentWillMount due to that also triggers on the server. Moved it to componentDidMount.

This should not cause any problems, as an immediate trigger of signals with previous position of listener would cause an error. Should not start updating the app before things are mounted.