Add note about preloading to routing introduction. (#22656)
Preloading is mentioned in the `next/link` docs, but not in the routing introduction.
This commit is contained in:
parent
5b0ed99093
commit
b874bc7f82
1 changed files with 2 additions and 0 deletions
|
@ -74,6 +74,8 @@ In the example above we have multiple links, each one maps a path (`href`) to a
|
|||
- `/about` → `pages/about.js`
|
||||
- `/blog/hello-world` → `pages/blog/[slug].js`
|
||||
|
||||
Any `<Link />` in the viewport (initially or through scroll) will be prefetched by default (including the corresponding data) for pages using [Static Generation](/docs/basic-features/data-fetching.md#getstaticprops-static-generation). The corresponding data for [server-rendered](https://nextjs.org/docs/basic-features/data-fetching#getserversideprops-server-side-rendering) routes is _not_ prefetched.
|
||||
|
||||
### Linking to dynamic paths
|
||||
|
||||
You can also use interpolation to create the path, which comes in handy for [dynamic route segments](#dynamic-route-segments). For example, to show a list of posts which have been passed to the component as a prop:
|
||||
|
|
Loading…
Reference in a new issue