atom library

Classes

Atom<T extends Object?>
A reactive primitive of type T.
Effect
An effect that runs anytime its dependencies change unless it is canceled.
MutableAtom<T extends Object?>
An Atom whose value can be mutated.

Functions

atom<T extends Object?>(T value) MutableAtom<T>
Create an instance of a MutableAtom of type T.
computed<T extends Object?>(T computation()) Atom<T>
Create an instance of Atom from the result of invoking computation.
effect(void effect()) Effect
Create an Effect which will be run once initially and then re-run whenever its dependencies change.

Exceptions / Errors

CyclicDependencyError
An error that is thrown when a cycle is detected.