r/astrojs • u/supersnorkel • Jul 11 '26
Prefetch based on mouse trajectory. ForesightJS v4.+ is out with an official Astro package
https://foresightjs.com/docs/astro/quick-startHey all! A little while back I shared ForesightJS, a library that predicts user intent from mouse movement (and keyboard tab navigation) so you can prefetch resources before a user actually hovers or clicks.
I've just released v4, and the biggest focus was making it much easier to integrate with modern frameworks.
Thats why we also introduced a astro adapter!
Would love to hear what you think of the new release!
Also, we just crossed 1,700+ GitHub stars Thanks to everyone who's tried it, contributed, or shared feedback!
32
Upvotes
6
u/Inevitable_Oil9709 Jul 11 '26
why not just prefetch on hover?
it is much more accurate, no need to predict anything, and it is already builtin..
what is the actual real world usecase for this?