preset
library
Classes
-
Computed<T>
-
A derived signal that computes its value from other signals.
-
Effect
-
A side effect that runs when its dependencies change.
-
EffectScope
-
A scope for grouping related effects together.
-
PresetSystem
-
A concrete implementation of the ReactiveSystem for handling
computed values, effects and reactive scopes.
-
Signal<T>
-
A reactive value that notifies subscribers when it changes.
-
WritableSignal<T>
-
A signal that can be read from and written to.
Extension Types
-
EffectStop
-
A wrapper type that provides a mechanism to stop tracking dependencies for an effect.
Functions
-
computed<T>(T getter(T? oldValue))
→ Computed<T>
-
Creates a new computed value that automatically updates when its dependencies change.
-
effect(void fn())
→ EffectStop<Effect>
-
Creates a new effect that automatically runs when its dependencies change.
-
effectScope(void fn())
→ EffectStop<EffectScope>
-
Creates a new effect scope that can be used to group and cleanup multiple effects.
-
endBatch()
→ void
-
Ends a batch update and processes any queued effects if this was the outermost
batch.
-
pauseTracking()
→ void
-
Temporarily pauses dependency tracking.
-
resumeTracking()
→ void
-
Resumes dependency tracking after it was paused with pauseTracking.
-
signal<T>(T value)
→ WritableSignal<T>
-
Creates a new signal with the given initial value.
-
startBatch()
→ void
-
Starts a batch update that prevents effects from being immediately executed when
signals change.