• Registers the given function to track reactive updates.

    The given function will be run once immediately. Every time any reactive property that's accessed within it gets updated, the function will run again.

    Type Parameters

    • T = any


    • fn: (() => T)

      The function that will track reactive updates.

        • (): T
        • Returns T

    • Optional options: ReactiveEffectOptions

      Allows to control the effect's behaviour.

    Returns ReactiveEffectRunner

    A runner that can be used to control the effect after creation.

Generated using TypeDoc