stunk
- Description: Stunk is a lightweight, framework-agnostic state management library based on atomic state principles. It breaks state into smaller, manageable "chunks" for efficient updates and reactivity.
- Purpose: Simplifies state management by providing granular control over state updates, reactivity, and derived values while minimizing overhead.
- Target Audience: Developers looking for a simple yet powerful state management solution, especially those working with React (via hooks) or other frameworks.
Key Features
- 🚀 Lightweight & Fast: No dependencies, minimal overhead.
- 🔄 Reactive: Automatic updates when state changes.
- 📦 Atomic State: State is divided into manageable "chunks."
- 🎭 State Selection: Derive specific parts of the state.
- 🔄 Async Support: Built-in handling for loading and error states.
- 🔌 Middleware & Time Travel: Extend functionality and undo/redo state changes.
- 🔍 Type-Safe: Full TypeScript support with type inference.
Framework Support
- Primarily designed for React (via
useChunk
,useDerive
,useComputed
, etc.). - Framework-agnostic core, allowing integration with other libraries.
Core Concepts
- Chunks: Atomic state containers that can be read, updated, or destroyed.
- Derived State: Reactive computations based on chunk values.
- Async State: Built-in support for async operations with loading/error states.
Documentation & Examples
License
- MIT licensed.
state-managementtypescriptangularreactsolidsveltevuequeflowclient-state-managementzustand-alternative
Featured Stories
No featured articles here. Navigate to an article, then pick the Feature on menu button