route segment
One part of a URL path between slashes, such as dashboard in /dashboard/settings, matching one folder in app/.
In more detail
Each segment can have its own layout, loading state, error boundary and configuration. The Router Cache and route segment config both work per segment.
Related terms
- route — The combination of HTTP method and URL path that a server maps to one handler, such as GET /orders/{id}.
- dynamic route — A route whose folder name is in square brackets, such as [slug], so one page file serves many URLs.
- 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.
Taught in
- Root & Nested Layouts: State Preservation Semantics — Next.js 15 & Modern App Router Architecture
- Dynamic Routes: Slugs & generateStaticParams — Next.js 15 & Modern App Router Architecture
- Error Boundaries: Nested error.tsx & Reset Logic — Next.js 15 & Modern App Router Architecture
- Full Route Cache: Static Rendering & Segment Config — Next.js 15 & Modern App Router Architecture
- Router Cache: In-Memory Client Prefetch Semantics — Next.js 15 & Modern App Router Architecture
- Runtime Environments: Node.js vs Edge Runtime Choice — Next.js 15 & Modern App Router Architecture