The Course is launching in Early Access! 🎉
The Modern Full Stack Next.js Course is launching in Early Access only to the folks on the waitlist in a couple of weeks.
Feedback
Curriculum
Next.js provides powerful routing capabilities, including dynamic routes and catch-all routes. Let's explore when to use each and how they differ.
Dynamic routes are used when you have a single variable segment in your URL. They're perfect for scenarios where you have a known structure but a dynamic value.
This route will match URLs like:
/blog/my-first-post
/blog/nextjs-tips
Catch-all routes are more flexible and can handle multiple dynamic segments. They're ideal when you need to capture an unknown number of parameters.
This route will match URLs like:
/blog/tech/nextjs/routing
/blog/lifestyle/travel/europe/france
Try out the different routing scenarios in this interactive demo to see if they should be a dynamic or catch-all route:
In this demo, try entering different URL paths to see how they're handled:
/blog/my-post
(Dynamic Route)/blog/tech/nextjs/routing
(Catch-all Route)app
-- blog
-- [slug]
-- page.tsx;
app
-- blog
-- [...slug]
-- page.tsx;