|
|
|
Show HN: Fluent-state: a new fresh take on local React state
(github.com)
|
|
5 points
by bosmarcel
502 days ago
|
|
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%2F...
GitHub: https://github.com/marsbos/fluent-state
NPM: https://www.npmjs.com/package/fluent-state Try it out plz. |
|
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
Demo: 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
Happy coding!