zustand-centralized-state

Installation
SKILL.md

Centralized State Management

A pattern for managing application state that keeps programs simple, testable, and easy to reason about. Uses Zustand vanilla stores as the mechanism, but the principles apply to any state management approach.

Background

Rich Hickey's talk "Simple Made Easy" (2011) argues that most program complexity comes from complecting (interleaving) things that should be independent. Mutable state is one of the worst offenders: it interleaves identity (what thing are we talking about), state (what is its current value), and time (when did it change).

When you mutate a Map in place, you lose the previous value, every reader is coupled to every writer, and you can't reason about what the state was at any point in time. State scattered across multiple mutable variables in different scopes makes it impossible to answer "what does the program look like right now?"

Installs
1
GitHub Stars
44
First Seen
Oct 10, 2026