Create a new signal that is computed based on the values of other signals.
The returned computed signal is read-only, and its value is automatically updated when any signals accessed from within the callback function change.
The effect callback.
Optionaloptions: SignalOptions<T>A new read-only signal.
Create an effect to run arbitrary code in response to signal changes.
An effect tracks which signals are accessed within the given callback
function fn, and re-runs the callback when those signals change.
The callback may return a cleanup function. The cleanup function gets run once, either when the callback is next called or when the effect gets disposed, whichever happens first.
The effect callback.
Optionaloptions: EffectOptionsA function for disposing the effect.
Run a callback function that can access signal values without subscribing to the signal updates.
The callback function.
The value returned by the callback.
Combine multiple value updates into one "commit" at the end of the provided callback.
Batches can be nested and changes are only flushed once the outermost batch callback completes.
Accessing a signal that has been modified within a batch will reflect its updated value.