Skip to content
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

Batch updates caused by handlers in multiple roots #1231

Merged
merged 1 commit into from
Apr 12, 2014

Conversation

sophiebits
Copy link
Contributor

Fixes #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.

@zpao
Copy link
Member

zpao commented Mar 10, 2014

I'm assuming but want to confirm - this fixes the layers bug we were talking about on Thursday?

@sophiebits
Copy link
Contributor Author

No, it doesn't. Still a good idea though.

var parentControl = <div>Parent</div>;
ReactMount.renderComponent(childControl, childContainer);
ReactMount.renderComponent(parentControl, parentContainer);
parentControl.getDOMNode().appendChild(childContainer);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you rebase and update for descriptors. This isn't going to be the right thing anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

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.
zpao added a commit that referenced this pull request Apr 12, 2014
Batch updates caused by handlers in multiple roots
@zpao zpao merged commit 3e2182f into facebook:master Apr 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Event handlers from different component trees should batch together
2 participants