02 / 10

How to create a dynamic route segment ?

A Dynamic Segment can be created by wrapping a folder's name in square brackets: [folderName]. For example, [id] or [slug].

Dynamic Segments are passed as the params prop to
  1. 1

    layout

  2. 2

    page

  3. 3

    route

  4. 4

    generateMetadata functions.