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

    Parameters

    • cleanupFn: (() => void)

      The callback function to attach to the effect's cleanup.

        • (): void
        • Returns void

    • OptionalfailSilently: boolean

      if true, will not throw warning when called without an active effect.

    • Optionalowner: ReactiveEffect<any>

      The effect that this cleanup function should be attached to. By default, the current active effect.

    Returns void