
PersonalLibrary2025
hank-zilla
Global React state as easy as useState.
A small open-source state library for React. Components share state by key with useAppState, with no Provider, Context or store boilerplate. It is built on useSyncExternalStore and published on npm.
1,500+
npm downloads, last 12 months
0
Runtime dependencies
3.0.3
Latest version
Highlights
- useAppState(key, default) works like useState, but any component reading the same key shares the value.
- setAppState and getAppState read and write the store outside React, from event handlers or plain modules.
- Subscriptions go through useSyncExternalStore, so updates stay consistent under concurrent rendering.
Stack
TypeScriptReactnpm