The dynamicParams option allows you to control what happens when a dynamic segment is visited that was not generated with generateStaticParams.
export const dynamicParams = true // true | false
export const dynamicParams = true // true | false
true(default): Dynamic route segments not included ingenerateStaticParamsare generated at request time.false: Dynamic route segments not included ingenerateStaticParamswill return a 404.
Good to know:
- This option replaces the
fallback: true | false | blockingoption ofgetStaticPathsin thepagesdirectory.dynamicParamsis not available when Cache Components is enabled.
Source: docs/01-app/03-api-reference/03-file-conventions/02-route-segment-config/dynamicParams.mdx