nextRound
TechnologiesCoding ProblemsBookmarksLearning Paths
nextRound
TechnologiesCoding ProblemsBookmarksLearning Paths
nextRound

AI-powered interview preparation platform. Practice with curated questions, mock interviews, and personalized learning paths to crack your dream tech interview.

Quick Links

  • Technologies
  • Saved Questions
  • Pricing

Company

  • About Us
  • Contact Us

Legal

  • Privacy Policy
  • Terms of Use

© 2026 nextRound. All rights reserved.

TOPIC OVERVIEW

nextjs/Dynamic Routes

Route segments whose value is filled in from the URL itself, not hardcoded.

10 QuestionsIntermediateHigh Priority ~10 min read

A folder named [id] creates a dynamic segment — its actual value is whatever appears in that position of the URL at request time, available to the page, layout, or Route Handler through params. [...slug] is a catch-all segment, matching any number of path segments and returning them as an array, while [[...slug]] makes that catch-all optional, matching even when no additional segments are present at all.

For pre-rendering specific dynamic values ahead of time, generateStaticParams tells Next.js exactly which param values to generate statically at build time. Anything not covered by it either 404s or gets generated on-demand at request time — which behavior applies depends on the dynamicParams setting for that route.

What you'll walk away knowing

The difference between a single dynamic segment [id], a catch-all [...slug], and an optional catch-all [[...slug]]
How params are read inside a page, layout, or Route Handler for a dynamic route
What generateStaticParams does, and what happens for param values it doesn't cover
How the dynamicParams option controls whether unlisted params 404 or render on-demand
1Explain the difference between [slug], [...slug], and [[...slug]]. Give examples of URLs each would match.Intermediate2How do you access route params in a Server Component vs a Client Component in the App Router?Intermediate3What happens when a user navigates to a dynamic route that was not pre-generated by generateStaticParams? How do you control this with dynamicParams?Intermediate4How would you implement slug-based routing that also supports localization? (e.g. /en/products/shoes vs /fr/produits/chaussures)Intermediate5How to create a dynamic route segment ?Intermediate6What are dynamic routes?Intermediate7How do you build a deeply nested dynamic route like /shop/[category]/[subcategory]/[productId]? What are the pitfalls?Intermediate8What is a route segment how to define it in next js?Intermediate9What are catch-all segments and what is its use?Intermediate10What is the difference between params and searchParams props in a page component? Can both be used in Server Components?Intermediate
All Topics
1
Basics
Project Structure
Runtime
Compiler
2
SSG
SSR
CSR
3
Routing
Route Handlers
Route Groups
Dynamic Routes
Parallel Routes
Intercepting Routes
4
Middleware
Server Actions
APIS
Data Fetching
Caching
Clients
5
Optimisation
i18n
Security
Architecture
Deployment
Accessibility
Sharethis topic

Share via WhatsApp, X, Facebook, LinkedIn or copy link. Open Graph preview enabled.