---
source: crates/biome_js_analyze/tests/spec_tests.rs
expression: withChildren.jsx
---
# Input
```jsx
<>
<>foo>
foo
foo
{/* valid */}
>
```
# Diagnostics
```
withChildren.jsx:2:5 lint/complexity/noUselessFragments FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Avoid using unnecessary Fragment.
1 │ <>
> 2 │ <>foo>
│ ^^^^^^^^
3 │ foo
4 │ foo
i A fragment is redundant if it contains only one child, or if it is the child of a html element, and is not a keyed fragment.
i Unsafe fix: Remove the Fragment
2 │ ····<>foo>
│ -- ---
```
```
withChildren.jsx:3:5 lint/complexity/noUselessFragments FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Avoid using unnecessary Fragment.
1 │ <>
2 │ <>foo>
> 3 │ foo
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4 │ foo
5 │ {/* valid */}
i A fragment is redundant if it contains only one child, or if it is the child of a html element, and is not a keyed fragment.
i Unsafe fix: Remove the Fragment
3 │ ····foo
│ ---------------- -----------------
```
```
withChildren.jsx:4:5 lint/complexity/noUselessFragments FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Avoid using unnecessary Fragment.
2 │ <>foo>
3 │ foo
> 4 │ foo
│ ^^^^^^^^^^^^^^^^^^^^^^^^
5 │ {/* valid */}
6 │
i A fragment is redundant if it contains only one child, or if it is the child of a html element, and is not a keyed fragment.
i Unsafe fix: Remove the Fragment
4 │ ····foo
│ ---------- -----------
```