Primitives

usePreloadRoute

Edit this page

usePreloadRoute returns a function that can be used to preload a route manually. This is what happens automatically with link hovering and similar focus based behavior, but it is available here as an API.

const preload = usePreloadRoute();
preload(`/users/settings`, { preloadData: true });
Report an issue with this page