title: React componentDidMount() is fired on unMounted component
body: <p>A simple react component that invokes a promise from the data store on <code>componentDidMount</code> is throwing a warning:</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 LocationNameView component.</p>
  </blockquote>
  
  <p>I threw a few debug <code>console.log</code> to see if <code>this.isMounted()</code> is true/false, and inside <code>componentDidMount</code> <code>this.isMounted()</code> will return false the first time then again and it will be true. I'm not sure if the docs are clear or the name of <code>componentDidMount</code> is skewing my reasoning here but it seems like this method should only be invoked if the component is actually mounted.</p>
  
  <p><a href="https://facebook.github.io/react/docs/component-specs.html#mounting-componentdidmount" rel="nofollow">enter link description here</a></p>
  
  <pre><code>componentDidMount: function() {
  
    var self = this;
    // make the request to the backend and replace the loading location text
    Models.Location.find(this.props.location)
      .then(function(location) {
  
          console.log(self.isMounted()); // &lt;--- shows false then true 
  
          self.setState({ location : location });
  
      });
  
  },
  </code></pre>