You can skip this part if you've already read the Github README.
Atoms are holders of state.
Atoms may have actions.
.focus method, which can be used as a selector/lens. xoid is based on immutable updates, so if you "surgically" set state of a focused branch, changes will propagate to the root.
State can be derived from other atoms. This API was heavily inspired by Recoil.
.map method can be used to quickly derive the state from a single atom.
Atoms are lazily evaluated. This means that the callback functions of
$doubleAlphain this example won't execute until the first subscription to these atoms. This is a performance optimization.
watch are used. They are the same, except
watch runs the callback immediately, while
subscribe waits for the first update after subscription.
All methods of a xoid atom are covered up to this point. This concludes the basic usage! 🎉