alien_signals
library
Classes
-
Computed<T>
-
A reactive computed value that derives from other signals.
-
Effect
-
A reactive effect that runs side effects in response to signal changes.
-
EffectScope
-
A scope that manages a collection of effects.
-
Signal<T>
-
A reactive signal that holds a value of type
T.
-
WritableSignal<T>
-
A reactive signal that can be both read and written.
Functions
-
computed<T>(T getter(T?))
→ Computed<T>
-
Creates a computed value that derives from other signals.
-
effect<T>(EffectCallback<T> fn)
→ Effect
-
Creates an effect that runs whenever its dependencies change.
-
effectScope(void fn())
→ EffectScope
-
Creates a scope for managing multiple effects.
-
endBatch()
→ void
-
Ends the current batch operation.
-
signal<T>(T initialValue)
→ WritableSignal<T>
-
Creates a writable signal with the given initial value.
-
startBatch()
→ void
-
Starts a new batch operation.
-
trigger(void fn())
→ void
-
Manually triggers reactive updates within a function.
Typedefs
-
EffectCallback<T>
= T Function()
-
Callback passed to an effect.
-
EffectCleanup
= void Function()
-
Cleanup function returned by an effect callback.