stunk
TypeScript icon, indicating that this package has built-in type declarations

2.2.3 • Public • Published

Stunk

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.

  • Pronunciation: Stunk (A playful blend of "state" and "chunk")

Stunk is like dividing your jar into many smaller containers, each holding a single piece of state. These smaller containers are called chunks. Each chunk can be updated and accessed easily, and any part of your app can subscribe to changes in a chunk so it gets updated automatically.

Features

  • 🚀 Lightweight and Fast: No dependencies, minimal overhead
  • 🔄 Reactive: Automatic updates when state changes
  • 📦 Batch Updates: Group multiple state updates together
  • 🎯 Atomic State Management: Break down state into manageable chunks
  • 🎭 State Selection: Select and derive specific parts of the state
  • 🔄 Async Support: Handle async state with built-in loading and error states
  • 🔌 Middleware Support: Extend functionality with custom middleware
  • ⏱️ Time Travel: Undo/redo state changes
  • 🔍 Type-Safe: Written in TypeScript with full type inference

Installation

npm install stunk
# or
yarn add stunk
# or
pnpm install stunk

Read Docs:

Stunk

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Pull Request

License

This is licence under MIT

Package Sidebar

Install

npm i stunk

Weekly Downloads

28

Version

2.2.3

License

MIT

Unpacked Size

36.7 kB

Total Files

44

Last publish

Collaborators

  • chiboy
  • abdulazeez70