This page is also available as Markdown at /docs/app/api-reference/file-conventions/route-segment-config/dynamicParams.md. For an index of Next.js documentation, see /docs/llms.txt.
dynamicParams
Last updated March 13, 2026
The dynamicParams option allows you to control what happens when a dynamic segment is visited that was not generated with generateStaticParams.
layout.tsx | page.tsx
export const dynamicParams = true // true | falsetrue(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.
Was this helpful?