dynamicParams
A route segment option that decides what happens to dynamic param values not returned by generateStaticParams.
In more detail
The default, true, renders unknown values on demand and caches them. Setting export const dynamicParams = false makes any unlisted value return 404.
Related terms
- generateStaticParams — A function exported from a dynamic route that lists the param values to pre-render as static pages at build time.
- route segment config — Constants exported from a page, layout or route file, such as dynamic, revalidate or runtime, that change how that segment is rendered and cached.
- 404 Not Found — The HTTP status meaning there is no resource at the requested address.
Taught in
- Dynamic Routes: Slugs & generateStaticParams — Next.js 15 & Modern App Router Architecture