immediately<T> method
Watcher<T>
immediately<T>(
- SourcesFn<
T> sourcesFn, - WatcherFn<
T> fn, { - WhenFn<
T> ? when, - JoltDebugFn? onDebug,
Creates a watcher hook that executes immediately upon creation.
Parameters:
sourcesFn: Function that returns the values to watchfn: Callback function executed when sources changewhen: Optional condition function for custom trigger logiconDebug: Optional debug callback for reactive system debugging
Returns: A Watcher that executes immediately
Implementation
Watcher<T> immediately<T>(
SourcesFn<T> sourcesFn,
WatcherFn<T> fn, {
WhenFn<T>? when,
JoltDebugFn? onDebug,
}) {
return useAutoDispose(() =>
Watcher<T>.immediately(sourcesFn, fn, when: when, onDebug: onDebug));
}