The Problem of a Regular Menu in NextJS
In the previous lesson, we made a menu from regular links:
export default function Menu() {
return <>
<a href="/">home</a>
<a href="/about">about</a>
<a href="/price">price</a>
<a href="/contacts">contacts</a>
</>;
}
Let's now discuss some problems related to this. The fact is that navigating through the links of this menu leads to a reload of the entire page. This is correct from an SEO perspective, but not very optimal from a performance perspective. The fact is that when the page is reloaded, we download the entire site layout again, although only the content changes. It would be more optimal to download only the page content.
NextJS provides a solution to this problem. We will consider it in the next lesson.
Make sure that navigating through regular links causes a page reload.