From the course: Learning Next.js

Unlock the full course today

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

Solution: Set up a file-based system with zero config

Solution: Set up a file-based system with zero config

From the course: Learning Next.js

Solution: Set up a file-based system with zero config

(upbeat music) - The Next.js framework helps and makes it super easy and fast to create a file-based routing system with zero configuration. So we'll see that and do that together with this exercise. So the first task for you was to create a list of contacts. So we're going to go inside this directory to create a new file which will automatically create a new route. So inside pages, it's going to be a new directory, contacts. So that's going to be actually contacts with an S. And inside contacts we're going to add index.js. Inside I'm going to import first Link because we're going to use this one to allow to navigate from one locations to another, to a new page actually. And I'm going to import this one from the module next/link. And I'm going to add also to the scope of this file, contacts. I am providing you with a list of contacts which is an array exported from this JavaScript file and every object corresponds to one…

Contents