A lightweight, framework-agnostic state management library built on atomic state principles for fine-grained reactivity.
Stunk is a lightweight, framework-agnostic state management library that uses atomic state principles to break application state into independent, reactive chunks. It solves the complexity of managing global state by providing fine-grained updates, auto-tracking computed values, and built-in async handling without framework dependencies.
JavaScript/TypeScript developers building applications with complex state needs across any framework (React, Vue, Svelte, etc.) who want fine-grained reactivity without boilerplate.
Developers choose Stunk for its atomic state model that enables precise reactivity, zero-dependency architecture, and built-in async/query capabilities—all while remaining framework-agnostic and highly extensible via middleware.
A framework-agnostic state management library that keeps your app’s state clean and simple. It uses a fine-grained state model, breaking state into independent, manageable chunks.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
At 3.32kB gzipped with zero dependencies, Stunk minimizes bundle impact while offering comprehensive state management features.
Atomic state chunks ensure only components dependent on changed state re-render, improving performance in complex UIs without extra boilerplate.
Computed values automatically track dependencies via .get() calls, eliminating manual dependency arrays and reducing code complexity.
The asyncChunk and mutation APIs include caching, deduplication, and automatic cache invalidation, simplifying data fetching and state synchronization.
Plugins for logging, persistence, validation, and time travel allow custom state behavior without modifying core logic, as shown with history() and persist().
As a newer library, Stunk has fewer third-party middleware and community resources compared to established options like Redux or Zustand.
While framework-agnostic, integrating with non-React frameworks requires manual setup, as the provided hooks (e.g., useChunk) are React-specific.
There's no built-in developer tools for debugging state changes, relying on middleware like logger for basic insights, which may hinder complex debugging.
Setting global defaults with configureQuery adds an extra layer of configuration that might be cumbersome for simple applications or quick prototypes.