≈ the.bay.news

Prefetch on intent, not on sight: a wrapper for Next.js

DEV Community
Prefetch on intent, not on sight: a wrapper for Next.js
Six destination links are always on screen on my 3D portfolio, so Next.js prefetched all six on every page load: 1.3 MB of other pages before the three.js chunk the home needed. Here's the 40-line wrapper that prefetches only when a pointer or focus stays, and the bug it caused on slow networks.

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.