Open arttemiuss43 opened 5 years ago
Because it does them on hover.
There have been requests in the past for the prefetch hover delay to be configurable. Maybe there would be a possibility of prefetch being confgurable in general. Different approaches make sense in different cases.
Because there are many possible prefetch strategies. Sapper provides the cheapest one.
You can prefetch based on intersection observer with: (not tested)
import { prefetch } from '@sapper/app'
onMount(() => {
const observer = new IntersectionObserver((evt) => prefetch(evt.notsure.href), options)
})
Why doesn't sapper prefetch links currently in view using intersection observer? It would more efficient.