Search⌘ K
AI Features

Links

Explore how to use Next.js Link component to create navigation within your app, including static pages and dynamic routes. Understand how to link dynamically generated pages for a seamless user experience, vital for building efficient React apps with Next.js.

This lesson is about how to link to pages in your app. This includes all pages: ones that are created from placing a JS file in that pages folder, as well as ones that you created as dynamic routes.

Let me give you an example. If you go to this page in the browser, i.e., http://localhost:3000/search/cats, your first instinct is that you can link to it from another page in your app like this <a href="http://localhost:3000/search/cats">Go here</a> . However, that will not work with Next.js.

...