title: Why do I have to click twice for an event in react js
body: <pre><code>var [broj, setBroj] = useState(0);
  function plus() {
      setBroj(broj++)
  }
  function minus() {
      setBroj(broj--)
  }
  return (&lt;div&gt;
      &lt;button onClick={plus}&gt;+&lt;/button&gt;
      &lt;h3&gt;{broj}&lt;/h3&gt;
      &lt;button onClick={minus}&gt;-&lt;/button&gt;
  &lt;/div&gt;
  )
  </code></pre>
  <p>when i click first time nothing just after second time work
  every 2 time ( onclick ) work</p>