title: React setState with promise as a callback
body: <p>I received an error when trying to SetState using a Promise as a callback in React. This is likely due to an error on my part and would like some clarification on set State in React. The error message I am receiving is as follows.</p>
  
  <p>ERR: "Invalid argument passed as callback. Expected a function. Instead received: [object Promise]"</p>
  
  <p>I have refactored my code example below (edit) to try and provide use to others.</p>
  
  <pre><code>    this.setState({ value: v }, this.callAsync)
  
  // Async function 
  
    callAsync = async () =&gt; {
      await this.props.foo({
      // Something async-y
     })
   .then(success =&gt; console.log(success)
   }
  </code></pre>