activeWatcher property
The currently active watcher instance.
This static field tracks the active watcher when its callback is executed within an untracked context. This allows onEffectCleanup to automatically detect the active watcher even when called within untracked blocks.
This field is set before calling the watcher's callback function and restored afterwards to maintain the previous watcher context.
Implementation
static Watcher? activeWatcher;