title: React useState not updating on first click
body: <p>Why doesn't the state change on first click?</p>
  <pre><code>const [building, setBuilding] = useState(0);
  </code></pre>
  <pre><code>&lt;Button 
       title=&quot;tester&quot;
            onPress={() =&gt; {
              setBuilding(1);
              console.log(Building);
            }}/&gt;
  </code></pre>
  <p>The console log always returns &quot;0&quot; on first click, instead of expected &quot;1&quot;. How do I fix this?</p>