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.
In more detail
Examples: export const dynamic = 'force-static', export const revalidate = 86400 or export const runtime = 'edge'. The values must be written as literals so Next.js can read them at build time.
Related terms
- export const dynamic — The route segment option that overrides automatic static or dynamic detection, with values such as force-dynamic and force-static.
- revalidation — Refreshing cached data or pages so they show new content, either after a time limit or on demand.
- export const runtime — The route segment option that picks the runtime for a page, layout or Route Handler: 'nodejs' (default) or 'edge'.
- dynamicParams — A route segment option that decides what happens to dynamic param values not returned by generateStaticParams.
Taught in
- Full Route Cache: Static Rendering & Segment Config — Next.js 15 & Modern App Router Architecture
- Runtime Environments: Node.js vs Edge Runtime Choice — Next.js 15 & Modern App Router Architecture