@embra/reactivity - v0.0.7
    Preparing search index...

    Function watch

    • Watch a reactive effect and re-run it when its dependencies change.

      Parameters

      Returns Disposer

      A disposer function to stop watching the effect.

      import { watch, writable, reactiveMap } from "./watch";

      const count$ = writable(0);
      const map$ = reactiveMap();

      watch((get) => {
      console.log(get(count$));
      console.log(get(map$).get("key"));
      });