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
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Getting started with the Next.js tooling4m 54s
-
(Locked)
Creating new pages3m 36s
-
(Locked)
Building a file-based routing system3m 58s
-
(Locked)
Creating links to navigate between pages2m 55s
-
(Locked)
Setting up dynamic routing and URLs5m 5s
-
(Locked)
Challenge: Set up a file-based system with zero config2m 58s
-
(Locked)
Solution: Set up a file-based system with zero config10m 42s
-
-
-
-