Library API
    Preparing search index...

    Variable effectConst

    effect: (fn: () => void | (() => void)) => EffectSubscription = effectFn

    Type Declaration

      • (fn: () => void | (() => void)): EffectSubscription
      • Runs a side-effect function immediately and re-runs it on a microtask whenever any reactive signals read during its evaluation change.

        Supports returning a cleanup callback: () => void | (() => void). Returns an EffectSubscription with .dispose() and [Symbol.dispose]().

        Parameters

        • fn: () => void | (() => void)

        Returns EffectSubscription