From the course: Learning Next.js
Unlock the full course today
Join today to access over 24,900 courses taught by industry experts.
Solution: Add a route
Now it's time for the challenge. And the task for you is to create a new route, a new nested route, by using the file system. We also want to be able to navigate to this new page by clicking on this link, which is not yet connected to anything. So instead we need to do it manually to access, for example, other pages, and then we can navigate from the About page to the Contact page. And we also want to be able to access a list of blog posts by clicking on this link, and then display a list of blog posts. But for now, this is not yet existing, and we need to update the file system and the folder structure in order to match this URL path. Blog posts. So let's go back to the code editor and find the corresponding exercise files. So that's going to be here inside Blog we're going to add a new folder segment. And I'm going to name this one post. And just like the other examples we're going to need to add a 'page.tsx'f, which is a special file that exports a React components. And that allows…