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
Use React state selectors and derived state with react-global-state-hooks. Control subscriptions and equality, and compose reusable selector hooks.
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
Persist React state in localStorage with react-global-state-hooks. Restore safely, migrate saved data, and avoid server-rendering 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.