Unverified Commit b874bc7f authored by Lee Robinson's avatar Lee Robinson Committed by GitHub

Add note about preloading to routing introduction. (#22656)

Preloading is mentioned in the `next/link` docs, but not in the routing introduction.
parent 5b0ed990
...@@ -74,6 +74,8 @@ In the example above we have multiple links, each one maps a path (`href`) to a ...@@ -74,6 +74,8 @@ In the example above we have multiple links, each one maps a path (`href`) to a
- `/about` → `pages/about.js` - `/about` → `pages/about.js`
- `/blog/hello-world` → `pages/blog/[slug].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 ### 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: 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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment