@jaybeeuu/recoilless
TypeScript icon, indicating that this package has built-in type declarations

10.0.2 • Public • Published

recoilless

npm

A slightly too fully fledged state management library based loosely on concepts found in recoil.

The basic idea is to have small blocks of state, atoms in Recoil or values in Recoilless (I prefer clear names), to which listeners can subscribe. When the value updates the subscribers are notified.

Values can either be primitive or derived. Primitive values are simple static values, numbers, strings etc. they are the building blocks of the state.

Derived values take primitive values, and calculate (or retrieve, since they can be asynchronous) some value. The calculation (or fetch) is only performed when the dependent values update.

Finally actions allow a function to be called which might update values. It may make use of values, but will only have a snapshot of them, i.e. will not setup a subscription.

For more details on how to use recoilless have a look at the unit tests for primitive values , derived values and actions .

Package Sidebar

Install

npm i @jaybeeuu/recoilless

Weekly Downloads

6

Version

10.0.2

License

MIT

Unpacked Size

31.9 kB

Total Files

39

Last publish

Collaborators

  • jaybeeuu