-
Notifications
You must be signed in to change notification settings - Fork 47.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Event handlers from different component trees should batch together #1227
Comments
Side-note, I'm not 100% up on the details of state and DOM batching. But it seems like RAF-batching is something they intend to make default "soon in the future", which would take care of batching both state and DOM updates I believe? Again, in the future. |
Yeah, we're going to do that once we figure out how pending state works. I believe we still want to flush any updates within the same event loop though, so this change will still be helpful. |
Fixes facebook#1227. It seems rare that event handlers in two roots nested in the DOM will update the same component in the same tick, but if that happens, the updates should be batched together.
Batch updates caused by handlers in multiple roots
Right now, ReactUpdates.batchedUpdates is called in ReactEventEmitterMixin.js but should probably be higher up in ReactTopLevelEventCallback.js so that with nested roots, updates are queued into the same batch.
The text was updated successfully, but these errors were encountered: