// app/product/[id]/page.tsxexportconst experimental_ppr = true;
exportdefaultfunctionPage() {
return (
{/* STATIC SHELL — prerendered at build, served from CDN */}
{/* DYNAMIC HOLE — fallback ships in the shell, real content streams */}
}>
{/* reads cookies() → dynamic, but only THIS subtree */}
}>
{/* per-user, streamed in */}
);
}
// ❌ Dynamic API OUTSIDE a boundary poisons the shell — PPR can't prerender.exportdefaultasyncfunctionPage() {
const user = cookies().get('uid'); // no Suspense above this → whole route dynamicreturn {user?.value};
}
Итог
Паттерн: experimental flag + Suspense holes; cookies() вне boundary убивает PPR для всего route.
Next.js: Partial Prerendering (PPR) — пример кода · Sobeso