title: Is React Hooks useState async?
body: <p><a href="https://i.stack.imgur.com/vJ0l8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vJ0l8.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/amnmf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/amnmf.png" alt="enter image description here" /></a></p>
  <p>Thank you for your help.</p>
  <p>I expected that when I click the button(red circle), the showPopUp in handleClick runs, and here the &quot;popup&quot; should be true, but it wasn't.
  I thought, the showPopUp(setState) is async and the console.log run first.</p>
  <p>What's the actual matter was and How can I use the useState function synchronously like Promise function?</p>