Bart Spaans
banner
bartspaans.com
Bart Spaans
@bartspaans.com
Self-taught developer currently creating ForesightJS, an open-source library for prefetching based on mouse movement
Pinned
First prototype of Toaster is ready!
😳😳😳
August 6, 2025 at 6:17 PM
Crazy results for foresight.com
August 2, 2025 at 8:45 AM
Opened a discussion space for ForesightJS and the devtools. Feel free to share how you are using it or ask questions!

github.com/spaansba/foresightjs/discussions
July 30, 2025 at 5:38 PM
Mobile support for js.foresight beta is live 😏. Let me know what you think and if you run into any bugs.

It has 2 options "viewport" (default) and "onTouchStart". Which can be set by using the touchDeviceStrategy prop during initialization.
July 29, 2025 at 9:24 PM
Never miss when Claude Code is done running
July 14, 2025 at 8:04 AM
Released V3.1.1 of Foresight with new devtools written in Lit
July 11, 2025 at 5:23 PM
Adding border radius to everything is the — of UI.
July 7, 2025 at 3:08 PM
Tried @lit.dev for the Foresight devtools and its so much fun to work with.

Probably will make a full switch to it as the current control panel is getting hard to maintain without a framework.
July 6, 2025 at 2:52 PM
Bundle Results of ForesightJS 3.0 > 2.2

- Bundle size: 77.6kB → 25kB (-68%)
- Gzipped: 18.6kB → 7.7kB (-58%)
- Download time: 372ms → 155ms (-58%)
- Dependencies: 3 → 2
July 2, 2025 at 7:05 AM
Just released V3.0.0 of ForesightJS! By decoupling the debugger into a new package (js.foresight-devtools) the core package is now 68% smaller (7.7kb minified + gzipped) 😍.

This is done by introducing events, which can now also be used by users for telemtry etc.

foresightjs.com/docs/getting...
Events | ForesightJS
Documentation on how to use the built-in js.foresight events
foresightjs.com
July 1, 2025 at 12:52 PM
I'm trying to decouple the Foresight Debugger completely from the js.foresight package. However, I don't know the right approach to take for this. Is there anyone with experience doing that is open for a chat?
June 30, 2025 at 8:03 AM
Completely redesigned the docs of foresightjs.com

Feedback is appreciated!
ForesightJS
ForesightJS is a lightweight JavaScript library that predicts user intent based on mouse movements and keyboard navigation, enabling optimal prefetching timing and improved performance.
foresightjs.com
June 24, 2025 at 1:11 PM
Official React hook for ForesightJS is live: foresightjs.com/docs/integra...
useForesight | ForesightJS
React hook for ForesightJS integration
foresightjs.com
June 23, 2025 at 4:30 PM
What is the best app for getting an overview of all your finances? Love something I can host myself if possible
June 20, 2025 at 3:16 AM
Reposted by Bart Spaans
This Week In React 238

Read and subscribe here!
thisweekinreact.com/newsletter/238

⚛️
- React Router
- RSC
- shadcn/ui
- TanStack Start
- React Aria
- ForesightJS
- Cosmos
📱
- iOS 26
- JSI setRuntimeData
- Windows
- Nitro
- WebView
- Bottom Tabs
- PencilKit
June 11, 2025 at 6:03 PM
No way, the prefetching docs of @nextjs.org refer to ForesightJS 😳.
June 11, 2025 at 12:39 PM
Just shipped ForesightJS v2.1 performance update.

Key changes:
- Replaced ResizeObserver + scroll/resize events with PositionObserver for async bounds calculation
- Added IntersectionObserver to only track elements in the viewport

Check out the changelog: github.com/spaansba/For...
Release V2.1 ~ Performance Gains and better debugger! · spaansba/ForesightJS
Features Added onAnyCallbackFired to the ForesightManager, this function will run when ANY callback function is hit. Read More Added new debuggerSettings.showNameTags to show or hide name tags on ...
github.com
June 10, 2025 at 6:55 AM
Reposted by Bart Spaans
📦 ForesightJS - Modern way to prefetch your data

This cool library predicts cursor moves to prefetch elements earlier

Docs show how to use with Next.js and React Router link components

Better than waiting for hover 👌
Even supports predictive tab keyboard nav 😄
June 6, 2025 at 7:50 AM
Created my first "blog" on how ForesightJS works behind the scenes. foresightjs.com/docs/Behind_...
Behind the Scenes | ForesightJS
A technical deep-dive into the internal workings of ForesightJS, explaining its architecture, how it predicts mouse movements using linear extrapolation and the Liang-Barsky algorithm, and how it pred...
foresightjs.com
June 4, 2025 at 10:55 AM
On another note I released v2.0 of ForesightJS, now with keyboard support! When you are N tabs away from a registered element it will run the callback function.

Check it out in the new playground: foresightjs.com
ForesightJS - Predictive Mouse Intent Library | ForesightJS
ForesightJs is a library for predictive mouse intent detection, enabling optimized prefetching and improved user experience.
foresightjs.com
June 2, 2025 at 4:44 PM
Kinda crazy I woke up today with a video in my Youtube feed about a package I created.

youtu.be/5n9JjFRdeh4?...
Has This Just Made Every Other Performance Optimization Obsolete?
YouTube video by Better Stack
youtu.be
June 2, 2025 at 4:42 PM
Anyone has an idea for the logo for foresightjs? The idea is early and smart prefetching based on user intent (mouse trajectory / tab tracking)
May 30, 2025 at 8:16 PM
“No frameworks as far as I am aware”. Thats a one hell of a sentence after releasing a product.
May 27, 2025 at 7:33 PM
PowerTree now supports Windows Registry!. View keys and values in tree format directly from PowerShell or export it to an .txt file.

github.com/spaansba/Pow...
May 26, 2025 at 3:57 PM