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

Remove content property #120

Merged
merged 1 commit into from
Jun 28, 2013
Merged

Remove content property #120

merged 1 commit into from
Jun 28, 2013

Conversation

sophiebits
Copy link
Collaborator

Fixes #119.

@zpao
Copy link
Member

zpao commented Jun 24, 2013

Welp, I wasn't expecting anybody to go for it yet, so bravo! We're going to have to do some big changes internally before we can merge this in (since we're still using content in a bunch of places). I'll work on getting that changed today so we can move forward with this

@sophiebits
Copy link
Collaborator Author

:) Figured that might be the case. (I'm just creating merge conflicts for myself with my textarea pull request anyway. Ah well.)

@yungsters
Copy link
Contributor

:) Figured that might be the case. (I'm just creating merge conflicts for myself with my textarea pull request anyway. Ah well.)

Just saw this, haha. Bravo @spicyj.

hasChildren + hasContent + hasInnerHTML <= 1,
'Can only set one of `children`, `props.content`, or ' +
'`props.dangerouslySetInnerHTML`.'
hasChildren + hasInnerHTML <= 1,
Copy link
Member

Choose a reason for hiding this comment

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

Let's change this to just check props.children and props.dangerouslySetInnerHTML since we only have the 2 things to check.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do you mean, get rid of the named vars?

Copy link
Member

Choose a reason for hiding this comment

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

Yea, we don't need to do any math to make sure you don't have both of these props. Math worked better than straight logic once you have 3.

@sophiebits
Copy link
Collaborator Author

(simplified invariant check, added link to jsperf for emptying a node)

@zpao zpao merged commit e998041 into facebook:master Jun 28, 2013
bvaughn added a commit to bvaughn/react that referenced this pull request Aug 13, 2019
Update selected index after mutation
taneliang referenced this pull request in MLH-Fellowship/react Aug 17, 2020
taneliang referenced this pull request in MLH-Fellowship/react Aug 19, 2020
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.

Remove content property
3 participants