vue-lynx / onWatcherCleanup

Function: onWatcherCleanup()

function onWatcherCleanup(
   cleanupFn, 
   failSilently?, 
   owner?): void

Registers a cleanup callback on the current active effect. This registered cleanup callback will be invoked right before the associated effect re-runs.

Parameters

ParameterTypeDescription
cleanupFn() => voidThe callback function to attach to the effect's cleanup.
failSilently?booleanif true, will not throw warning when called without an active effect.
owner?ReactiveEffect<any>The effect that this cleanup function should be attached to. By default, the current active effect.

Returns

void

Defined in

node_modules/.pnpm/@vue+reactivity@3.5.30/node_modules/@vue/reactivity/dist/reactivity.d.ts:750