What happens when you call the setState updater function returned by useState?

React Developer Easy

React Developer — Easy

What happens when you call the setState updater function returned by useState?

Key points

  • React does not update the state synchronously
  • The component does not re-render immediately in the same tick
  • The re-render is scheduled for the next tick

Ready to go further?

Related questions