Next.js · Junior · Question 8 of 75

Why is <Link> from next/link better than a plain <a href> for internal navigation?

Explanation

<Link> renders a regular <a> (so SEO doesn't suffer) but intercepts the click and performs an SPA transition: shared layouts are kept, and only what's needed is loaded. Links in the viewport are prefetched in production. For external addresses, use a plain <a>.

Further reading

Problem with a question

Next.js · Junior · question 8

Test yourself

Take the Next.js · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz