Skip to content

idootop/ZenBox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

44 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ZenBox

What is ZenBox?

ZenBox is a modern React state management library that combines the simplicity of Zustand with the reactive patterns of Vue. It provides an intuitive API that feels natural to developers familiar with either framework.

Love Zustand & Vue? Meet ZenBox ❀️

🐻 Zustand's Simplicity

const counter = createStore({ count: 0 }); // Auto-type inference

πŸ’š Vue-like Developer Experience

const doubled = useComputed(() => counter.value.count * 2);

useWatch(
  () => counter.value.count,
  (current, prev) => console.log("Count changed from", prev, "to", current)
);

Why Choose ZenBox?

  • πŸš€ 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)

Getting Started

We believe ZenBox will transform how you think about React state management.

npm install zenbox

Ready to experience state management that feels like magic? ✨

Community & Support

ZenBox vs Zustand

Feature ZenBox Zustand
Learning Curve βœ… Minimal (Vue-friendly) βœ… Low
Vue-like Reactivity βœ… useComputed/useWatch ❌ Manual handling
TypeScript Support βœ… Complete auto-inference ⚠️ Manual interface definition
State Access βœ… Unified store.value interface ❌ Manual get()/set()
Cross-Store Computed βœ… Automatic dependency tracking ⚠️ Requires pre-combination
Store Scoping βœ… Built-in Provider for isolation ❌ Global by default
Immer Integration βœ… Built-in support ⚠️ Middleware required
Bundle Size < 3KB gzipped (without Immer) < 1KB gzipped

License

MIT License Β© 2025-PRESENT Del Wang

About

Code React like Vue πŸ’š, manage state like Zustand 🐻.

Resources

License

Stars

Watchers

Forks

Languages