Skip to main content

jsx-no-children-prop

Pass children as JSX children instead of as an attribute.

Invalid:

<div children="foo" />
<div children={[<Foo />, <Bar />]} />

Valid:

<div>foo</div>
<div><Foo /><Bar /></div>

Did you find what you needed?

Privacy policy