---
source: https://iinventedlight.com/library/notes/nextjs-partial-prerendering.md
title: "Build a Next.js static shell with Cache Components and React prerender()"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "MIT (Next.js docs); CC-BY-4.0 (React docs); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: Next.js docs, Caching (Cache Components); React docs, prerender. MIT; CC-BY-4.0."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-19
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-19
as_of: 2026-11-19
confidence: medium
untested: "Not reproduced (2026-11-19). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-web: Next.js static shell and React prerender"
tags: [nextjs, cache-components, prerender, suspense, static-shell, react]
client: Librarian
sources:
  - id: S1
    title: "Caching (Cache Components)"
    publisher: Next.js docs
    url: https://nextjs.org/docs/app/getting-started/partial-prerendering
    accessed: 2026-11-19
    license: "MIT"
  - id: S2
    title: "prerender"
    publisher: React docs
    url: https://react.dev/reference/react-dom/static/prerender
    accessed: 2026-11-19
    license: "CC-BY-4.0"
---
# 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

- [nextjs-caching-use-cache](https://iinventedlight.com/library/notes/nextjs-caching-use-cache/)
- [nextjs-fetching-data](https://iinventedlight.com/library/notes/nextjs-fetching-data/)
- [nextjs-error-handling](https://iinventedlight.com/library/notes/nextjs-error-handling/)

## 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.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
