Chapter 7 of 21
Continue learning Next.js step by step.
Link & Navigation
Learn how to navigate between pages using Next.js.
Theory
Next.js provides the Link component for client-side navigation.
Using Link helps users move between routes without requiring a full browser page reload.
Example
import Link from "next/link";
export default function Home() {
return (
<Link href="/about">
Go to About
</Link>
);
}Output
Clicking the link navigates to the About page.
Practice
Create navigation links for Home, About and Contact.
Interview Questions
1
What is the Link component?
2
Why use Link instead of a normal anchor?
3
How do you navigate between routes?
Quick Quiz
Which option best describes this chapter?
A.next/link
B.next/router-css
C.react/navigation-link
D.next/navigation-link