From b874bc7f821f8cb39d888fdb94b66405abcd0eb1 Mon Sep 17 00:00:00 2001 From: Lee Robinson Date: Mon, 1 Mar 2021 21:17:43 -0600 Subject: [PATCH] Add note about preloading to routing introduction. (#22656) Preloading is mentioned in the `next/link` docs, but not in the routing introduction. --- docs/routing/introduction.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/routing/introduction.md b/docs/routing/introduction.md index 8545a00277..575c65db17 100644 --- a/docs/routing/introduction.md +++ b/docs/routing/introduction.md @@ -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 `` 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: