Configuration
dynamicParams
With Cache Components disabled, dynamicParams=false restricts a dynamic route to generated paths; true allows unlisted paths to be processed on demand. A generated path is not a permission grant. Do not copy this option into the Cache Components-enabled lane. Source: https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config. Documentation-reviewed illustrative draft; installed declarations and runtime not verified.
Formal Syntax & Structure
nextjs syntaxnextjs
export const dynamicParams = false;Working Example
Example Snippetnextjs
export const dynamicParams = false;export function generateStaticParams(){return [{slug:"moss"},{slug:"fern"}];}export default async function Page({params}:{params:Promise<{slug:string}>}){return <h1>{(await params).slug}</h1>;}