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

Don't add children to 'void' elements #1

Closed
peternewnham opened this issue Jan 24, 2016 · 0 comments
Closed

Don't add children to 'void' elements #1

peternewnham opened this issue Jan 24, 2016 · 0 comments
Assignees
Labels
Milestone

Comments

@peternewnham
Copy link
Owner

The parser currently tries to add children to all elements types. Some elements such as 'input', 'img' etc do not have children and React throws a warning if you try to give children to them.

The parser should not add children to these element types. See https://github.com/facebook/react/blob/fdd7fabd129b573fc142df6883398c1ecf0561b0/src/renderers/dom/shared/ReactDOMComponent.js#L343 for the complete list.

@peternewnham peternewnham self-assigned this Jan 24, 2016
@peternewnham peternewnham added this to the v1.0.2 milestone Jan 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant