From the course: Master Next.js: Elaborate Hands-On Web Development, React Basics, Advanced Next.js, and Deployment

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

How to create dynamic routes with Next.js

How to create dynamic routes with Next.js

All right, so we've got this blog, and we're in a new section, and it's time to enhance it to the next level. In this blog, we've got this index page, and we've got some data, blog data. But we still haven't really created individual blog pages yet. So we've got these two pages here, but not really. If we want the URL for these pages to work, they're going to have to depend on the blog data specifically, because the blogs are being created. I mean, that's how we'd have to look at it, right? Like it's not just some magic us in the real world making all these blogs. It would be somebody creating the blogs on a CMS or something like that. If that's the case, we'd wanna automate that process. So when they create a blog, it would create what? Well, a dynamic route on our application that just then gets populated. So that's really what this section is gonna focus on. We're gonna learn how to statically generate pages with dynamic routes, and that's with a very important Next.js special…

Contents