Are useMutableSource events automatically batched? #318
-
Hello, I've read through this issue #89 to understand how to batch multiple store updates. I see that react concurrent mode will solve that issue, because react will automatically batch multiple setStates. But I've noticed that zustand v4 will use useMutableSource instead of useReducer internally. Is it guaranteed that react in concurrent mode will automatically batch multiple update events from useMutableSource? |
Beta Was this translation helpful? Give feedback.
Answered by
dai-shi
Feb 26, 2021
Replies: 1 comment 1 reply
-
That said, I'm not 100% sure how batching behaves in concurrent mode... |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
kirillNevedrov
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That said, I'm not 100% sure how batching behaves in concurrent mode...