Small API.
Clear mental model.
Start with a shared store. Add precision, structure and visibility as your application grows.
const useCount = createGlobalState(0);
const [count, setCount] = useCount();A hook for components.
A state API for everything else.
A guide for every layer.
Core concepts
Stores and hooks
What createGlobalState returns, how the hook doubles as the store API, and why state lives outside React.
Selectors and derived state
Subscribe to a slice, derive values, depend on local state, share selector hooks, and control equality.
Actions
Group state changes behind named functions, return values, call other actions, and extend a store from outside.
Scoped state with createContext
Give each part of the tree its own store with the same selector and action API as global state.
Persistence
Save a store to localStorage, restore it safely, migrate old data, save only part of the state, and avoid hydration mismatches.
Metadata and non-reactive access
Read and change state outside components, subscribe to changes, and keep side data that never triggers renders.
API reference
Guides
Quality
DevTools
When the state is the evidence.
Connect your browser, terminal and coding agent.