Skip to main content

App Router Mastery

Advanced Dynamic Routing Patterns

0:00
LearnStep 1/4

Dynamic Route Patterns

Dynamic Routing: From Simple to Complex

Route Segment Types

PatternExample URLparams
[slug]/blog/hello{ slug: 'hello' }
[...slug]/blog/a/b/c{ slug: ['a','b','c'] }
[[...slug]]/blog or /blog/a/b{ slug: undefined } or { slug: ['a','b'] }

Catch-All Routes

tsx

Optional Catch-All Routes

tsx

Type-Safe Route Parameters

tsx

Static Generation with generateStaticParams

tsx