main
Branches
main (2.15.1)dev
Versions
2.15.11.19.3v0.21.0
React Router v7 has been released. View the docs
PrefetchPageLinks

<PrefetchPageLinks />

This component enables prefetching of all assets for a page to enable an instant navigation to that page. It does this by rendering <link rel="prefetch"> and <link rel="modulepreload"/> tags for all the assets (data, modules, css) of a given page.

<Link rel="prefetch"> uses this internally, but you can render it to prefetch a page for any other reason.

<PrefetchPageLinks page="/absolute/path/to/your-path" />

Note: You need to use an absolute path.

Docs and examples licensed under MIT