APIs
Fragment
Groups children without a DOM wrapper. Explicit Fragment syntax accepts a key; the shorthand does not. This entry covers stable grouping only.
Formal Syntax & Structure
react syntaxreact
FragmentWorking Example
Example Snippetreact
import { Fragment } from "react";export default function App() { return <Fragment><h1>Books</h1><p>Ready</p></Fragment>; }