Unverified Commit 37c66dcd authored by x4th's avatar x4th Committed by GitHub

Update router.prefetch section to clarify it supports dynamic routes (#29070)

* Update router.prefetch section to clarify it supports dynamic routes

* Apply suggestions from code review
Co-authored-by: 's avatarLee Robinson <me@leerob.io>
Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
parent 4452366e
...@@ -202,7 +202,7 @@ Prefetch pages for faster client-side transitions. This method is only useful fo ...@@ -202,7 +202,7 @@ Prefetch pages for faster client-side transitions. This method is only useful fo
router.prefetch(url, as) router.prefetch(url, as)
``` ```
- `url` - The URL to prefetch, that is, a path with a matching page - `url` - The URL to prefetch, including explicit routes (e.g. `/dashboard`) and dynamic routes (e.g. `/product/[id]`)
- `as` - Optional decorator for `url`. Before Next.js 9.5.3 this was used to prefetch dynamic routes, check our [previous docs](https://nextjs.org/docs/tag/v9.5.2/api-reference/next/link#dynamic-routes) to see how it worked - `as` - Optional decorator for `url`. Before Next.js 9.5.3 this was used to prefetch dynamic routes, check our [previous docs](https://nextjs.org/docs/tag/v9.5.2/api-reference/next/link#dynamic-routes) to see how it worked
#### Usage #### Usage
......
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