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:
Lee Robinson 2021-03-01 21:17:43 -06:00 committed by GitHub
parent 5b0ed99093
commit b874bc7f82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: