Pre-loading routes
Answered
Rex posted this in #help-forum
RexOP
Hi, I found that when I click on a button which redirects me to another page (router.push('/...')) it requires so much time for the first time the user click, after this it works fast.
Any suggestions?
Any suggestions?
Answered by not-milo.tsx
You can use the
See: https://nextjs.org/docs/app/api-reference/functions/use-router#userouter
prefetch method attached to the router.See: https://nextjs.org/docs/app/api-reference/functions/use-router#userouter
2 Replies
You can use the
See: https://nextjs.org/docs/app/api-reference/functions/use-router#userouter
prefetch method attached to the router.See: https://nextjs.org/docs/app/api-reference/functions/use-router#userouter
Answer