Skip to content

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

@peternewnham

Description

@peternewnham

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.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions