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

10.0.0 • 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

9

Version

10.0.0

License

MIT

Unpacked Size

41.7 kB

Total Files

40

Last publish

Collaborators

  • jaybeeuu