4 ms·
Show HN: Fluent-state: a new fresh take on local React state
Hi HN
I built *fluent-state*, a lightweight React hook that replaces useState, useReducer, useMemo, and useEffect.
It gives you:
- A fluent, proxy-based API: `state.user.name('Joe')`
- Immutable updates without spread logic
- Automatic dependency tracking
- Built-in `compute` for reactive, memoized derived state (no useMemo needed)
- Built-in `effect` for reactive side-effects with automatic dependency tracking (no useEffect needed)
- Zero boilerplate, full control
Designed for local state, nested structures, and clean, declarative code.
Demo: https://stackblitz.com/edit/vitejs-vite-uh4kyzkf?file=src%2FApp.tsx https://stackblitz.com/edit/vitejs-vite-uh4kyzkf?file=src%2F...
GitHub: https://github.com/marsbos/fluent-state https://github.com/marsbos/fluent-state
NPM: https://www.npmjs.com/package/fluent-state https://www.npmjs.com/package/fluent-state
Try it out plz.
- pedrochao1985 1y ago[dead]
- pedrochao1985 1y ago[dead]
- bosmarcel 1y agoHi everyone! Thanks for the interest in fluent-state. Just a quick note: for easy installation and trying out the demo, check out these links: NPM: https://www.npmjs.com/package/fluent-state https://www.npmjs.com/package/fluent-state Demo: https://stackblitz.com/edit/vitejs-vite-uh4kyzkf?file=src%2FApp.tsx https://stackblitz.com/edit/vitejs-vite-uh4kyzkf?file=src%2F... The GitHub repo is still available here for source and issues: https://github.com/marsbos/fluent-state https://github.com/marsbos/fluent-state Happy coding!