From the course: Learning Next.js
Unlock the full course today
Join today to access over 23,200 courses taught by industry experts.
Creating links to navigate between pages
From the course: Learning Next.js
Creating links to navigate between pages
- We now have a working file-based routing system but this is not complete yet because we won't be using the address bar every time that we need to navigate to a page. So what we did so far is we could go to "about" like so, and then go to "learn", "NextJS" but we won't be using the address bar each time that we need to navigate to one page. Instead, we're going to be using this component link that we're going to use import from the module "next link" to allow enable client side transitions between routes in our application. So let's go back to the code editor and to enable client side transitions in our application. We're going to import first add to the scope of our component here. So the index so we're going to create a navigation on the main page. We're going to import here, the Component link from the module next link. And the way this works is very simple. So I'm going to put the links here. We're going to wrap…
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
-
-
-
-