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

Fix switching between dangerouslySetInnerHTML and children #4427

Merged
merged 1 commit into from
Jul 20, 2015

Conversation

sophiebits
Copy link
Collaborator

With this, ReactMultiChild handles all of the children-related operations for ReactDOMComponent so that we don't process operations out of order. This is necessary because ReactMultiChild does its own batching so there's no way without its cooperation to get the timing right here.

Ideally we'll factor this logic out a bit better in subsequent updates but this is the simplest way to fix #1232 which has embarrassingly been open for over a year.

@@ -123,10 +124,16 @@ var DOMChildrenOperations = {
update.toIndex
);
break;
case ReactMultiChildUpdateTypes.SET_MARKUP:
Copy link
Member

Choose a reason for hiding this comment

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

I think we need to add SET_MARKUP to ReactMultiChildUpdateTypes 😉

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

With this, ReactMultiChild handles all of the children-related operations for ReactDOMComponent so that we don't process operations out of order. This is necessary because ReactMultiChild does its own batching so there's no way without its cooperation to get the timing right here.

Ideally we'll factor this logic out a bit better in subsequent updates but this is the simplest way to fix facebook#1232 which has embarrassingly been open for over a year.
sophiebits added a commit that referenced this pull request Jul 20, 2015
Fix switching between dangerouslySetInnerHTML and children
@sophiebits sophiebits merged commit 16483e3 into facebook:master Jul 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switching from dangerouslySetInnerHTML to children
3 participants