DEV Community

Discussion on: React setState Asynchronous Behaviour

Collapse
 
ignasave profile image
Ignacio Martin Vazquez

But why in the second approach ir increments by 3 and not by 4?

Collapse
 
mrusman profile image
Mr-Usman

There are three times a call to setState for the setState for increment operation so that is why the value is updating to 3.