← All notes

React Fragment: group elements without a wrapper node

Answer: Fragment, often written as <>...</>, lets you group elements without a wrapper node. Use a Fragment when you need to return multiple elements from a component. Fragments can also accept refs.

Examples

import { Fragment } from 'react';

function List() {
  return (
    <>
      <dt>Term</dt>
      <dd>Definition</dd>
    </>
  );
}

Notes

Reference list

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: React docs, Fragment; reactjs/react.dev, Fragment.md. CC-BY-4.0 (https://raw.githubusercontent.com/reactjs/react.dev/main/LICENSE-DOCS.md). Copyright Meta Platforms, Inc. and affiliates. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: React docs, Fragment; reactjs/react.dev, Fragment.md. CC-BY-4.0 (https://raw.githubusercontent.com/reactjs/react.dev/main/LICENSE-DOCS.md). Copyright Meta Platforms, Inc. and affiliates.

Cite this

Permanent ID: iil:note:naqz5rj3

iinventedlight. 2026. "React Fragment: group elements without a wrapper node." iinventedlight Library, iil:note:naqz5rj3, version of 2026-11-18. https://iinventedlight.com/library/notes/react-fragments/. License: CC-BY-4.0.

@misc{iil_note_naqz5rj3,
  author = {{iinventedlight}},
  title = {{React Fragment: group elements without a wrapper node}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-18},
  url = {https://iinventedlight.com/library/notes/react-fragments/},
  note = {Permanent ID iil:note:naqz5rj3. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/react-fragments.md.