foxact

React Hooks/Utils done right. For Browser, SSR, and React Server Components.
GitHub
326
Created 2 years ago, last commit 13 days ago
14 contributors
260 commits
Stars added on GitHub, month by month
12
1
2
3
4
5
6
7
8
9
10
11
2023
2024
Stars added on GitHub, per day, on average
Yesterday
+1
Last week
+0.3
/day
Last month
+0.2
/day
Last 12 months
+0.3
/day
npmPackage on NPM
foxact
0.2.43
Monthly downloads on NPM
12
1
2
3
4
5
6
7
8
9
10
11
2023
2024
README

foxact logo

foxact

React Hooks/Utils done right. For Browser, SSR, and React Server Components.

Documentation

https://foxact.skk.moe

Features

React 18 Safe

All hooks and utils are React 18+ Concurrent Rendering resilient. foxact strictly follows 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 <Suspense />, startTransition, <OffScreen /> without worrying about app falling apart.

SSR Friendly

Works perfectly with server-side rendering, incremental static generation, and static site generation.

Supports Next.js (both Pages Directory and App Router), Waku, Gatsby, Remix, and Shopify Hydrogen.

Type Safe and Sound

Written in TypeScript. Unlocking strong typing benefits with TypeScript 4.8+.

Super Lightweight

The entire foxact library has zero dependencies, ensuring a lean and efficient solution. And what's more...

Fully Tree Shakable

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.

License

MIT


foxact © Sukka, Released under the MIT License. Authored and maintained by Sukka with help from contributors (list).

Personal Website · Blog · GitHub @SukkaW · Telegram Channel @SukkaChannel · Mastodon @sukka@acg.mn · Twitter @isukkaw · Keybase @sukka