docs: improve NuxtLink prefetch explanation (#7540)

This commit is contained in:
Pooya Parsa 2022-09-15 12:17:57 +02:00
parent f0005e6684
commit 4775ee8e31

View File

@ -38,7 +38,7 @@ 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.
When a `<NuxtLink>` enters the viewport on the client side, Nuxt will automatically prefetch components and payload (generated pages) of the linked pages ahead of time, resulting in faster navigation.
```vue [pages/app.vue]
<template>