You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any state updates triggered inside that callback will be batched. Any state updates triggered outside that callback will not be batched. Timeouts, promises, and async functions will end up executing outside that callback, and therefore not be batched.
Update states multiple times like
setA('a');setB('b');
within async function like api callback, timer etc... will not batch updated
We can use useReducer to avoid redundant rendering calls.
The text was updated successfully, but these errors were encountered:
Reference: facebook/react#14259
Update states multiple times like
within async function like api callback, timer etc...
will not batch updated
We can use
useReducer
to avoid redundant rendering calls.The text was updated successfully, but these errors were encountered: