Suspense shows a fallback until lazy code or use()-read data inside it is ready
Answer: <Suspense fallback={<Loading />}> lets you display a fallback until its children have finished loading. The loading fallback stays visible until all the code and data the children need has been loaded.
Example
import { Suspense, lazy } from 'react';
const MarkdownPreview = lazy(() => import('./MarkdownPreview.js'));
export default function Page() {
return (
<Suspense fallback={<Loading />}>
<MarkdownPreview />
</Suspense>
);
}
What activates a boundary
A Suspense boundary waits for its content to be ready before revealing it. Two things keep a boundary from revealing content:
- Lazy-loading component code with
lazy. - Reading a Promise with
use, such as data streamed from Server Components or loaded by a Suspense-enabled framework.
Caveats
- Suspense does not detect when data is fetched inside an Effect or event handler.
- For renders that got suspended before they could mount for the first time, React does not preserve any state.
- Nested boundaries reveal nested content as it loads; a Transition can show stale content while fresh content is loading.
lazy rules
lazy lets you defer loading a component's code until it is rendered for the first time. Always declare lazy components at the top level of your module, not inside a component, or their state will be reset on re-renders.
See also
Claims
- id: C1 claim: Suspense displays a fallback until children finish loading. source: S1 evidence: "lets you display a fallback until its children have finished loading"
- id: C2 claim: Suspense does not detect fetching inside an Effect or event handler. source: S1 evidence: "Suspense does not detect when data is fetched inside an Effect or event handler."
- id: C3 claim: Lazy-loading with lazy activates a boundary. source: S1 evidence: "Lazy-loading component code with lazy"
- id: C4 claim: lazy defers loading a component's code until first render. source: S2 evidence: "lets you defer loading component's code until it is rendered for the first time"
Sources
- [S1] Suspense. React docs (reference). https://react.dev/reference/react/Suspense . License: CC-BY-4.0. Accessed 2026-11-18.
- [S2] lazy (source page). reactjs/react.dev (GitHub). https://github.com/reactjs/react.dev/blob/main/src/content/reference/react/lazy.md . License: CC-BY-4.0. Accessed 2026-11-18.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: React docs (reference), Suspense; reactjs/react.dev (GitHub), lazy (source page). 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 (reference), Suspense; reactjs/react.dev (GitHub), lazy (source page). CC-BY-4.0 (https://raw.githubusercontent.com/reactjs/react.dev/main/LICENSE-DOCS.md). Copyright Meta Platforms, Inc. and affiliates.
Cite this
iinventedlight. 2026. "Suspense shows a fallback until lazy code or use()-read data inside it is ready." iinventedlight Library, iil:note:2wp7s8m7, version of 2026-11-18. https://iinventedlight.com/library/notes/react-suspense/. License: CC-BY-4.0.
@misc{iil_note_2wp7s8m7,
author = {{iinventedlight}},
title = {{Suspense shows a fallback until lazy code or use()-read data inside it is ready}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-18},
url = {https://iinventedlight.com/library/notes/react-suspense/},
note = {Permanent ID iil:note:2wp7s8m7. License: CC-BY-4.0.},
}
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-suspense.md.