deno_lint logodeno_lint

All rules/jsx-no-useless-fragment

jsx-no-useless-fragment

RecommendedFresh

Fragments are only necessary at the top of a JSX "block" and only when there are

multiple children. Fragments are not needed in other scenarios.

Invalid:

<></>
<><div /></>
<><App /></>
<p>foo <>bar</></p>

Valid:

<>{foo}</>
<><div /><div /></>
<>foo <div /></>
<p>foo bar</p>