• Create a watch that runs an effect whenever the dependencies change.

    Parameters

    • effect: WatchEffect

      The effect function which will be called immediately and whenever the dependencies change.

    • Optional config: WatchConfig

      Optional watch config.

    Returns ValDisposer

    A disposer function that can be called to stop the watch.