title: removeEventListener not working when called in componentWillUnmount
body: <p>I'm trying to <code>setState()</code> such that it renders different number of items on different screen sizes set to component state as the window is resized. I've added an event listener when the component mounts and removed it when it unmounts.</p>
  
  <pre><code>componentDidMount()
  {
      this.updateValue();
      window.addEventListener("resize", this.updateValue.bind(this));
  }
  
  updateValue()
  {
      var windowWidth = window.screen.width;
      if(windowWidth &lt;= 991 &amp;&amp; windowWidth &gt;= 768){
          this.setState({ items:6 })
      } else if(windowWidth &lt;= 767 &amp;&amp; windowWidth &gt;= 479){
          this.setState({ items:4 })
      } else if( windowWidth &lt; 480 &amp;&amp; windowWidth &gt;= 359){
          this.setState({ items:2 })
      } else if( windowWidth &lt; 360){
          this.setState({ items: 2})
      } else {
          this.setState({items:12})
      }
  }
  
  componentWillUnmount()
  {
      window.removeEventListener("resize", this.updateValue.bind(this));
  }
  </code></pre>
  
  <p>Works fine when I'm in the route with the component mounted; until I move away from the component by opening another route and resize the window which is when I get the error:</p>
  
  <blockquote>
    <p>Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the FeaturedRestaurants component.</p>
  </blockquote>
  
  <p>I get like a hundred errors in a second as I resize the screen.</p>
  
  <p>Clearly, the <code>removeEventListener</code> isn't working. Where did I go wrong?</p>