High-cardinality sites can't pre-render every slug. Without generateStaticParams, every visit shows a Suspense fallback. With it, unknown slugs block while generating.
experimental.partialFallbacks gives unknown slugs an instant shell from CDN while dynamic data streams in. After the first visit, the page is upgraded to fully static.
next.config.ts
1
constnextConfig={
2
experimental: {
3
partialFallbacks:true,
4
},
5
};
Demo
A product catalog with 9 products. Only 3 are in generateStaticParams.
Build-time products (1–3) load instantly with no fallback.
Request-time products (4–9) generate a unique slug per click, so you always see the streaming behavior. Visiting the same URL again loads instantly from cache.
An artificial 2 second delay makes the difference more noticeable.
Notes
This demo uses the experimental partialFallbacks flag and the use cache directive.
layout.tsx (statically inferred)
page.tsx (Cacheable)
Products (9)
Products 1–3 are generated at build time via generateStaticParams. Products 4–9 are discovered at request time.