A Computation describes a live action that automatically runs in response
to when state inside the Computation updates. These can be thought of as
side effects that occur when state objects update their data.
The Computations namespace manages the stack of the currently running
Computations. The Computations namespace exposes a small API to read and
write to this stack, although this is preferably not used outside of the
core APIs of rxs.
State represents any data that should be remembered during the lifetime of
the application's runtime, the State classes themselves functioning as a
container that enables rxs to perform its magic. The value of the wrapped
data is subject to change over time, but will not change its type over time
unless specified as dynamically typed.
Immediately computes the provided action. The action is a plain Dart
function that rxs will automatically treat as "live", where it will be
eagerly recomputed whenever any of its stateful dependencies is updated.
on<S, D>(Ddependencies, Saction(Ddependencies))
→ S
A utlity function to explicitly declare the dependencies of the given
action. State used within the action that are not part of the action's
dependencies will not trigger a recompute since the action has been
wrapped within a ref.
Create a plain reference to the given data within a computation. A ref
informs any compute functions that they should not depend on the data
wrapped within the ref.