Framework-agnostic state management library designed for simplicity and scalability
xoid is based on atoms. Atoms are standalone setter/getter objects that hold state.
create function is used to create them.
It has a Recoil-inspired API for derived atoms.
With the second argument, you can specify actions for your atoms.
use function is used to grab these actions.
xoid has a minimal React integration.
No need for wrapping components into context providers.
useAtom and start using!
No more hand-written reducers!
use function, when used with a second argument, acts as a selector.
The selected node will be a subscribable getter/setter object like any other atom.
xoid is based on immutable updates, so if you "surgically" set state of a selected branch, changes will propagate to the root.
No-API Finite State Machines!
No additional syntax is required to define and use finite state machines. Just use the second argument of the callback as the state transition function.
- Easy to learn
- Small bundle size
- Zero configuration
- Computed values
- Async actions
- Transient updates
- Local & global state
- Finite state machines
- Extensive Typescript support