When we have multiple update to same store or different stores, it was hard to batch them, especially if triggered as useEffect on multiple components.
This batched implementation allows components to be notified of updates to the same store at the same time if the change of state happens in the same tick.
It causes the re-render to be no longer sync but scheduled, however given react partially batches already it's just happening earlier.
One possible downside is that in case of long tasks the update might come later.
In case of problems can be disabled globally with defaults.batchUpdates = false
When we have multiple update to same store or different stores, it was hard to batch them, especially if triggered as useEffect on multiple components.
This batched implementation allows components to be notified of updates to the same store at the same time if the change of state happens in the same tick. It causes the re-render to be no longer sync but scheduled, however given react partially batches already it's just happening earlier. One possible downside is that in case of long tasks the update might come later.
In case of problems can be disabled globally with
defaults.batchUpdates = false