title: How to deal with useState delay
body: <p>In React, I often use the states of constants in other operations following <code>setState()</code> (or api interactions), but it’s common for the state to not be updated yet when that section of the code runs, most of the time resulting in errors/unexpected behavior.</p>
  <p>Is there a best practice for dealing with this? Or a recommended alternative to <code>useState</code> itself?</p>
  <p>Thanks :)</p>