React Hooks/Utils done right.
For Browser, SSR, and React Server Components.
All hooks and utils are React 18+ Concurrent Rendering resilient. We strictly follow React best practices, e.g. never read and write ref during the render phase (unlike many other open-sourced React Hooks libraries). You can use foxact with
<OffScreen /> without worrying about app falling apart.
Works perfectly with server-side rendering, incremental static generation, and static site generation.
Supports Next.js (opens in a new tab) (both Pages Directory and App Router), Waku (opens in a new tab), Gatsby (opens in a new tab), Remix (opens in a new tab), and Shopify Hydrogen (opens in a new tab).
Written in TypeScript. Unlocking strong typing benefits with TypeScript 4.8+.
The entire foxact library has zero dependencies and is about 5 KiB gzipped in sum, ensuring a lean and efficient solution. And what's more...
Every hook and util is isolated and side-effects free, eliminating unused code and delivering leaner bundles for lightning-fast load times. Feel free to take what you want from foxact without worrying about client bundle size.
Personal Website (opens in a new tab) · Blog (opens in a new tab) · GitHub @SukkaW (opens in a new tab) · Telegram Channel @SukkaChannel (opens in a new tab) · Mastodon @firstname.lastname@example.org (opens in a new tab) · Twitter @isukkaw (opens in a new tab) · Keybase @sukka (opens in a new tab)