Lesson 1.3

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.

Duration
8m
Level
Intermediate
Students
16k 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

Resources

Next.js documentation

The official reference for the tools used in this lesson.