title: React setState not updating state
body: <p>So I have this:</p>
  <pre class="lang-js prettyprint-override"><code>let total = newDealersDeckTotal.reduce(function(a, b) {
    return a + b;
  },
  0);
  
  console.log(total, 'tittal'); //outputs correct total
  setTimeout(() =&gt; {
    this.setState({ dealersOverallTotal: total });
  }, 10);
  
  console.log(this.state.dealersOverallTotal, 'dealersOverallTotal1'); //outputs incorrect total
  </code></pre>
  <p><code>newDealersDeckTotal</code> is just an array of numbers <code>[1, 5, 9]</code> e.g.
  however <code>this.state.dealersOverallTotal</code> does not give the correct total but <code>total</code> does? I even put in a timeout delay to see if this solved the problem.
  any obvious or should I post more code?</p>