Loading video...

Video Failed to Load

Go Home

"How can I reduce prefetching (to optimize hosting bill) without sacrificing navigation speed too much in Next?" Try prefetching on hover

102,126 views • 11 months ago •via X (Twitter)

10 Comments

Alex Sidorenko's profile picture
Alex Sidorenko11 months ago

Code example in the docs (scroll a bit to the code block)

Brad Larson's profile picture
Brad Larson11 months ago

for the bold, nextjs has an experimental feature - unstable_dynamicOnHover I have a link component in my apps that I import everywhere, so this was a one line change for me (dont forget to set th)e feature in your next config as well 😺

Alex Sidorenko's profile picture
Alex Sidorenko11 months ago

Nice! TIL

3IMAD's profile picture
3IMAD11 months ago

or use By predicting cursor motion, this library prefetches elements ahead of time.

Alex Sidorenko's profile picture
Alex Sidorenko11 months ago

Yep, this one in todos for future vids, looks very interesting

Tom Watkins's profile picture
Tom Watkins11 months ago

Always surprises me this isn't the default. I quite like how @tannerlinsley links work with user intent

Adam M's profile picture
Adam M11 months ago

Oh that’s nice

Muperdev's profile picture
Muperdev11 months ago

oh, never thought about it, damn I love it man! gonna swtich my links to hoverOnPrefetch

Yosuva Rajendran's profile picture
Yosuva Rajendran11 months ago

nice one

D.E's profile picture
D.E11 months ago

Should be the default behaviour tbh

Related Videos