docs: add note about link prefetching (#7540)

This commit is contained in:
Clément Ollivier 2022-09-15 11:29:30 +02:00 committed by GitHub
parent 3ed63a6b70
commit f0005e6684
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,6 +38,8 @@ pages/
The `<NuxtLink>` component links pages between them. It renders a `<a>` tag with the `href` attribute set to the route of the page. Once the application is hydrated, pages transitions are performed in JavaScript by updating the browser URL. This prevents full-page refreshes and allow for animated transitions.
When a `<NuxtLink>` enters the viewport, Nuxt will automagically prefetch the linked page in background, resulting in faster subsequent page transitions.
```vue [pages/app.vue]
<template>
<header>