ZenBox is a modern React state management library that combines the simplicity of Zustand with the reactive patterns of Vue.
Love Zustand & Vue? Meet ZenBox β€οΈ
const counter = createStore({ count: 0 }); // Auto-type inference
const doubled = useComputed(() => counter.value.count * 2);
useWatch(
() => counter.value.count,
(current, prev) => console.log("Count changed from", prev, "to", current)
);
- π Easy to Use - Intuitive API for immediate productivity
- β‘ High Performance - Only re-renders what actually changed
- πͺ TypeScript First - Full type inference out of the box, zero boilerplate
- π― Flexible Architecture - Works for both global and component-level state
- π¦ Lightweight - 100 lines of core code, under 3KB gzipped (without Immer)
π Visit https://zenbox.del.wang to view the full documentation.
npm install zenbox
- π GitHub: idootop/ZenBox
- π Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
Feature | ZenBox | Zustand |
---|---|---|
Learning Curve | β Minimal (Vue-friendly) | β Low |
Vue-like Reactivity | β
useComputed /useWatch |
β Manual handling |
TypeScript Support | β Complete auto-inference | |
State Access | β
Unified store.value interface |
β Manual get() /set() |
Cross-Store Computed | β Automatic dependency tracking | |
Store Scoping | β Built-in Provider for isolation | β Global by default |
Immer Integration | β Built-in support | |
Bundle Size | < 3KB gzipped (without Immer) | < 1KB gzipped |
MIT License Β© 2025-PRESENT Del Wang