Dynamic routes and route params

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.

Lesson 1.38m 16sIntermediate16.4k students

Lesson length

8:16

What this lesson covers

  • Capture single, catch-all, and optional catch-all segments
  • Read params and search params inside a page
  • Pre-render known routes with generateStaticParams

This lesson sits in Routing and Layouts, part of Next.js App Router in Depth. It assumes what came before it and leads directly into the next lesson in the module.

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

Resources