Skip to content

Commit

Permalink
Add note about preloading to routing introduction. (#22656)
Browse files Browse the repository at this point in the history
Preloading is mentioned in the `next/link` docs, but not in the routing introduction.
  • Loading branch information
leerob authored Mar 2, 2021
1 parent 5b0ed99 commit b874bc7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/routing/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b874bc7

Please sign in to comment.