Function effect

  • Call the passed function immediately and every time the signals it depends on are updated.

    Type Parameters

    • T

    Parameters

    • fn: (() => T)

      A function to watch for

        • (): T
        • Returns T

    • Optional options: SignalOptions<T>

      Effect options.

    Returns (() => void)

    Stop watching function.

      • (): void
      • Returns void

Generated using TypeDoc