Dynamic route segments and generateStaticParams
Answer: Wrap a folder name in square brackets to create a Dynamic Segment. Pair it with generateStaticParams to statically generate routes at build time.
See also
Claims
- id: C1 claim: Dynamic Segments use square-bracket folders. source: S1 evidence: "A Dynamic Segment can be created by wrapping a folder's name in square brackets:
[folderName]."
- id: C2 claim: Dynamic Segments model unknown path values. source: S1 evidence: "define a Dynamic Segment to create routes from dynamic data."
- id: C3 claim: generateStaticParams pairs with dynamic segments. source: S2 evidence: "The
generateStaticParamsfunction can be used in combination with [dynamic"
- id: C4 claim: generateStaticParams statically generates routes. source: S2 evidence: "to statically generate routes at"
Sources
- [S1] Dynamic routes. Next.js docs. https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes . License: MIT (vercel/next.js). Accessed 2026-11-09.
- [S2] generateStaticParams. Next.js docs. https://nextjs.org/docs/app/api-reference/functions/generate-static-params . License: MIT (vercel/next.js). Accessed 2026-11-09.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Copyright (c) 2025 Vercel, Inc. Sources: Next.js docs (vercel/next.js on GitHub / nextjs.org), MIT (https://raw.githubusercontent.com/vercel/next.js/canary/license.md). Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Next.js docs, Dynamic routes, MIT (vercel/next.js); Next.js docs, generateStaticParams, MIT (vercel/next.js). Copyright (c) 2025 Vercel, Inc. MIT (https://raw.githubusercontent.com/vercel/next.js/canary/license.md).
Cite this
iinventedlight. 2026. "Dynamic route segments and generateStaticParams." iinventedlight Library, iil:note:mtb913pc, version of 2026-11-09. https://iinventedlight.com/library/notes/nextjs-dynamic-routes/. License: CC-BY-4.0.
@misc{iil_note_mtb913pc,
author = {{iinventedlight}},
title = {{Dynamic route segments and generateStaticParams}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-09},
url = {https://iinventedlight.com/library/notes/nextjs-dynamic-routes/},
note = {Permanent ID iil:note:mtb913pc. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/nextjs-dynamic-routes.md.