title: in React, why setState() Priority execution than setTimeout？
body: <p>in React, <code>setState()</code> is async function, and <code>setTimeout()</code> is also async function(somebody think, in some condition, <code>setState()</code> may be sync function?),
  why <code>setState()</code> priority excution than <code>setTimeout()</code>? </p>
  
  <pre><code>componentDidMount(){
      this.setState({val: this.state.val + 1}, ()=&gt;{
          console.log("In callback " + this.state.val);
      });
      console.log("Direct call " + this.state.val);   
      setTimeout(()=&gt;{
          console.log("begin of setTimeout" + this.state.val);
          this.setState({val: this.state.val + 1}, ()=&gt;{
              console.log("setTimeout setState callback " + this.state.val);
          });
          setTimeout(()=&gt;{
              console.log("setTimeout of settimeout " + this.state.val);
          }, 0);
          console.log("end of setTimeout " + this.state.val);
      }, 0);
  }
  
  &gt; Direct call 0
  &gt; In callback 1
  &gt; begin of setTimeout 1
  &gt; setTimeout setState callback 2
  &gt; end of setTimeout 2
  &gt; setTimeout of settimeout 2
  </code></pre>