title: Couldn't setState from the then function of the Promise
body: <p>I'm trying to update the state from the <code>promise</code> which I received using the <code>fetch</code> function. </p>
  
  <pre><code>componentDidMount(){
  
  fetch(url).then((responseText) =&gt; {
  
       var response = responseText.json();
  
       response.then(function(response){
           this.setState(response);
       });
  
    });
  }
  </code></pre>
  
  <p>I was getting the error that the <code>setState</code> is not an function</p>
  
  <p>Then, I tried to <code>bind(this)</code> to pass the <code>this</code> value like below. </p>
  
  <pre><code>componentDidMount(){
  
  fetch(url).then((responseText) =&gt; {
  
       var response = responseText.json();
  
       response.then(function(response){
           this.setState(response);
       });
  
    }).bind(this);
  }
  </code></pre>
  
  <p>It is not working now also. Same error again.</p>