next/link
на сайте с 23 марта 2023, 17:22
Client-side transitions between routes can be enabled via the Link component exported by next/link. For an example, consider a pages directory with the following files In order for the <Link /> component to properly prefetch links with rewrites via Middleware, you need to tell Next.js both the URL to display and the URL to prefetch. This is required to avoid un-necessary fetches to middleware to know the correct route to prefetch.