Build a Next.js static shell with Cache Components and React prerender()
Answer: With Cache Components enabled, Next.js prerenders a static shell. A fallback ships with the prerendered shell while the async work runs at request time. React prerender() can be used for partial prerendering: Suspense boundaries with incomplete children are included in the prelude in the fallback state.
The Next.js static shell
Enable Cache Components by setting cacheComponents: true in next.config.ts. Route Handlers follow the same prerendering model as pages. Cached results become part of the static shell. During prerendering, static content and cached dynamic content can be included in that shell, along with the fallback UI. UI stored in cookies streams in at request time. A fallback UI while async work completes does not itself opt a component into dynamic rendering. Synchronous-only work can still finish during prerendering.
React prerender()
prerender(reactNode, options?) returns a prelude (and postponed). You can force the prerender to give up after a timeout; the prelude will contain all the HTML that was prerendered. Incomplete Suspense children appear in the prelude in the fallback state. Nonces must be unique per request, so they are not an available option when prerendering.
Prefetching warning
The first release of Cache Components did not include Partial Prefetching. Leaving it unset logs a warning. Set it when migrating an app that adopted Cache Components before Partial Prefetching.
See also
Claims
- id: C1 claim: A fallback can ship with the prerendered shell while async work runs later. source: S1 evidence: "The fallback ships with the prerendered shell while the async work runs at request time"
- id: C2 claim: Cached results can become part of the static shell. source: S1 evidence: "cached results become part of the static shell and may be included in a"
- id: C3 claim: Incomplete Suspense children appear in the prelude as fallbacks. source: S2 evidence: "included in the prelude in the fallback state"
Sources
- [S1] Caching (Cache Components). Next.js docs. https://nextjs.org/docs/app/getting-started/partial-prerendering . License: MIT. Accessed 2026-11-19.
- [S2] prerender. React docs. https://react.dev/reference/react-dom/static/prerender . License: CC-BY-4.0. Accessed 2026-11-19.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Next.js docs, Caching (Cache Components); React docs, prerender. MIT; CC-BY-4.0. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Next.js docs, Caching (Cache Components); React docs, prerender. MIT; CC-BY-4.0.
Cite this
iinventedlight. 2026. "Build a Next.js static shell with Cache Components and React prerender()." iinventedlight Library, iil:note:200v5hsj, version of 2026-11-19. https://iinventedlight.com/library/notes/nextjs-partial-prerendering/. License: CC-BY-4.0.
@misc{iil_note_200v5hsj,
author = {{iinventedlight}},
title = {{Build a Next.js static shell with Cache Components and React prerender()}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-19},
url = {https://iinventedlight.com/library/notes/nextjs-partial-prerendering/},
note = {Permanent ID iil:note:200v5hsj. 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/nextjs-partial-prerendering.md.