alien_signals library
Alien signals preset library.
Classes
-
Computed<
T> - A computed signal.
- Effect
- A reactive effect.
- EffectScope
- A reactive effect scope.
-
Signal<
T> - A readonly signal.
-
WritableSignal<
T> - A writable signal.
Functions
-
computed<
T> (T getter(T? previousValue)) → Computed< T> - A Computed derives a memoized value from other signals, and only re-computes when those dependencies change.
-
effect(
void callback()) → Effect - An Effect runs a function, and schedules it to re-run when the signals it reads change.
-
effectScope(
void callback()) → EffectScope - An EffectScope groups effects allowing them to be disposed at the same time.
-
endBatch(
) → void - Ends the current batch of reactive updates and flushes pending effects if needed.
-
getActiveSub(
) → ReactiveNode? - Gets the currently active reactive subscription.
-
getBatchDepth(
) → int - Gets the current batch depth.
-
setActiveSub(
ReactiveNode? sub) → ReactiveNode? - Sets the currently active reactive subscription and returns the previous one.
-
signal<
T> (T initialValue) → WritableSignal< T> - A WritableSignal stores a value, and can be updated.
-
startBatch(
) → void - Starts a new batch of reactive updates.