LESSON 1.3
Dynamic routes and route params
Learn key techniques and workflows in Next.js App Router in Depth.
8m
intermediate
16,355 students
Overview
Dynamic segments capture values out of the URL and hand them to your page. Pre-generating the known ones turns a database read into a static file.
In this lesson you will:
- Capture single, catch-all, and optional catch-all segments
- Read params and search params inside a page
- Pre-render known routes with generateStaticParams
Pro Tip
Pre-generate the routes you already know about; leave the long tail to render on demand.