Put in order · Next.js course · Module 2: Routing and Layouts
Creating a Dynamic Route
Arrange the steps for creating a dynamic route in App Router
Items to put in order
- Use the parameter in the component
- Add a page.js file in the directory
- Create a directory with brackets [slug]
- Receive the parameter through props.params
Show the answer
Correct order:
- Create a directory with brackets [slug]
- Add a page.js file in the directory
- Receive the parameter through props.params
- Use the parameter in the component