DEV Community

Hein Htet Zaw
Hein Htet Zaw

Posted on

Does React keep the order for state updates? Check this answer!

I work on React.

TLDR:

But can you trust React to update the state in the same order as setState is called for

  • the same component?

Yes.

  • different components?

Yes.

The order of updates is always respected. Whether you see an intermediate state "between" them or not depends on whether…

Top comments (0)