title: Why should addChangeListener be in componentDidMount instead of componentWillMount?
body: <p>I saw this line as an answer to another question on here:</p>
  
  <p>"componentWillMount should be componentDidMount, or else you'll leak event emitters in node."</p>
  
  <p>and I don't really understand it. Can someone explain with more detail?</p>
  
  <p>More info:</p>
  
  <p>Building a react application with flux, as part of the initial render, a child component computes some data. Ideally, after this data is computed, I would like to call an action that updates the store's state with a portion of this new data. </p>
  
  <p>Normally, updating the store's state emits a change event that causes a re-render. However, because the change listener isn't being added until componentDidMount (rather than in componentWillMount), my top level component isn't able to listen for the change that occurs during the initial render and initiate a re-render.</p>
  
  <p>If I move the addChangeListener to componentWillMount that would seem to fix this issue, but the above quote suggests that this is a bad idea?</p>