title: React why should I remove event listeners?
body: <p>I see a lot of code like this:</p>
  
  <pre><code>componentDidMount() {
    // add event listener
  }
  
  componentWillUnmount() {
    // remove event listener
  }
  </code></pre>
  
  <p>I understand if the listener is set on something global like <code>window</code>, but if it's just on an HTML element within the component that's about to be unmounted, won't the listener disappear with the component anyway?</p>