On this answer by Dan Abramov here on SO, I\'ve found out the following:
Does React keep the order for state updates?
Currently (React 16 and earl
Nice question. Here is additional info to complete @FranklinOcean answer.
Answer for current version of react, which is 16.8.3.
Based on the following codesandbox:
Batched setStuff
calls:
useEffect
block synchronouslyonClick={handlerFunction}
)Non batched calls that will trigger a re-render each time:
I'll try re-run the sandbox with future versions of react to see how it goes!