Replies: 1 comment
-
That callback is really meant for dispatching synchronous actions so that there's only one UI update. That said, it's also obsolete as of React 18, as React 18 now always batches all queued renders within a single event loop tick. So, if you're using React 18, you don't need to use |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I saw code like below, the code does not throw error at runtime. But I don't think put I/O operations in the callback function of
batch
is correct. However, I am not aware of what effects it might have. If it's a bad practice, please document this in the instructions.Beta Was this translation helpful? Give feedback.
All reactions