Skip to content

Conversation

@sophiebits
Copy link
Collaborator

Nicer version of #644 and #735. Fixes #101. Context is neat.

@sophiebits
Copy link
Collaborator Author

@sebmarkbage Reactions?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Should we be doing this already? My warning didn't work without it.

@sebmarkbage
Copy link
Collaborator

This doesn't work properly until we actually switch to parent context, right? We have to solve nested renders first.

I have another idea that I wanted to pursue with the new refactor. mountComponent/receiveComponent for a composite should return the DOM component to the next DOM component.

@sophiebits
Copy link
Collaborator Author

No, this works as-is. context here is parent-based; it's just not yet used for this.context. (Right now nested renders don't share context at all though so you wouldn't get a warning then.)

@sophiebits sophiebits force-pushed the valid-3 branch 2 times, most recently from a337bf6 to 19658a8 Compare March 20, 2015 20:02
@sophiebits
Copy link
Collaborator Author

(Updated to validate text nodes and that the container type is valid for the root element too.)

Copy link
Member

Choose a reason for hiding this comment

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

But hgroup was dropped from the spec (which is why I never added it). But I guess if it's still supported, fine.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh! Okay, will kill.

Copy link
Member

Choose a reason for hiding this comment

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

Meh, it doesn't matter too much anymore since React.createElement('hgroup') works

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Guess I'll leave it then.

@sophiebits sophiebits force-pushed the valid-3 branch 3 times, most recently from 531af87 to 735a20b Compare March 20, 2015 22:37
Nicer version of facebook#644 and facebook#735. Fixes facebook#101. Context is neat.
@zpao
Copy link
Member

zpao commented Mar 23, 2015

We can update this for @sebmarkbage's idea later.

sophiebits added a commit that referenced this pull request Mar 24, 2015
Validate node nesting, take 3
@sophiebits sophiebits merged commit 9260b54 into facebook:master Mar 24, 2015
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.

React should throw on nested <p> tags

3 participants