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

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…

Contents