Skip to content

Introduction

Stunk is a lightweight, framework-agnostic state management library built on atomic state principles. It simplifies state management by breaking state into manageable "chunks", ensuring efficient updates and reactivity.

What is Stunk?

Stunk—a playful blend of "state" and "chunk"—is designed to be a fast, flexible, and reactive state management solution for TypeScript and JavaScript applications. It embraces atomic state management while offering advanced features like middleware, time travel, and async state handling.

Why Stunk?

Imagine your application's state as a large jar. Instead of storing everything in one messy container, Stunk lets you divide it into smaller, well-organized chunks. These chunks hold individual pieces of state, making them easy to update, access, and subscribe to. When a chunk changes, only the necessary parts of your application update—boosting performance and efficiency.

🚀 Key Benefits:
Lightweight & Fast – Minimal overhead, no dependencies.
Fine-Grained Reactivity – Automatic updates for subscribed chunks.
Batch Updates – Group updates, notify once.
Async-Ready – Built-in support for loading and error states.
Middleware Support – Extend functionality with custom logic.
Time Travel Debugging – Easily undo and redo state changes.

With Stunk, state management is no longer a hassle—it’s effortless, scalable, and intuitive.