Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

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

102,126 Aufrufe • vor 1 Jahr •via X (Twitter)

10 Kommentare

Profilbild von Alex Sidorenko
Alex Sidorenkovor 1 Jahr

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

Profilbild von Brad Larson
Brad Larsonvor 1 Jahr

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 😺

Profilbild von Alex Sidorenko
Alex Sidorenkovor 1 Jahr

Nice! TIL

Profilbild von 3IMAD
3IMADvor 1 Jahr

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

Profilbild von Alex Sidorenko
Alex Sidorenkovor 1 Jahr

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

Profilbild von Tom Watkins
Tom Watkinsvor 1 Jahr

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

Profilbild von Adam M
Adam Mvor 1 Jahr

Oh that’s nice

Profilbild von Muperdev
Muperdevvor 1 Jahr

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

Profilbild von Yosuva Rajendran
Yosuva Rajendranvor 1 Jahr

nice one

Profilbild von D.E
D.Evor 1 Jahr

Should be the default behaviour tbh

Ähnliche Videos