Use hitSlop to Trigger Predictions Earlier
Expand the invisible prediction area around elements with hitSlop to start loading sooner.
Incorrect (tight prediction area):
const { elementRef } = useForesight({
callback: () => prefetch(),
hitSlop: 0,
});Correct (expanded prediction area):
const { elementRef } = useForesight({
callback: () => prefetch(),
hitSlop: 20,
});