0

From React getting started tutorial:

React may batch multiple setState() calls into a single update for performance.

How do multiple calls to setState can be batched to one call? Did they mean that multiple calls will be batched to multiple sync calls and one async call at the end?

I will love to see an example if it's possible.

Stav Alfi
  • 10,681
  • 15
  • 74
  • 124
  • Looks like a duplicate of: https://stackoverflow.com/questions/48563650/does-react-keep-the-order-for-state-updates/48610973#48610973 – bradcush Aug 21 '18 at 15:44
  • Possible duplicate of [Does React keep the order for state updates?](https://stackoverflow.com/questions/48563650/does-react-keep-the-order-for-state-updates) – devserkan Aug 21 '18 at 16:03

0 Answers0