19 onClose={onClose}
20 show
21 footer={
22 <>23 <Button kind="secondary" onClick={onClose}>24 Close25 </Button>26 </>27 }
28 >
29 <p>Best solver: {run.best_solver.name} </p>
18 </li>
19 );
20 }
21 return <></>;22 }
23 return (
24 <nav
16 onClose={onClose}
17 show
18 footer={
19 <>20 <Button kind="secondary" onClick={onClose}>21 Close22 </Button>23 </>24 }
25 >
26 <div className="accordion" id="tmpResultAccordion">
Fragments are a syntax that allow you to build a react component with multiple nodes or subcomponents, without requiring a wrapper element.
A fragment is considered to be redundant if:
Removing the fragments can fix this issue.
// Example 1
<>{foo}</>
// Example 2
<><Foo /></>
// Example 3
<p><>foo</></p>
// Example 4
<></>
// Example 5
<Fragment>foo</Fragment>
// Example 6
<React.Fragment>foo</React.Fragment>
// Example 7
<section>
<>
<div />
<div />
</>
</section>
// Example 1
<>
<Foo />
<Bar />
</>
// Example 2
<>foo {bar}</>
// Example 3
<> {foo}</>
// Example 4
const cat = <>meow</>
// Example 5
<SomeComponent>
<>
<div />
<div />
</>
</SomeComponent>
// Example 6
<Fragment key={item.id}>{item.value}</Fragment>