MCPcopy Create free account
hub / github.com/clientdb/clientdb / runObserved

Function runObserved

core/tests/utils/mobx.ts:3–9  ·  view source on GitHub ↗
(callback: () => T)

Source from the content-addressed store, hash-verified

1import { autorun } from "mobx";
2
3export function runObserved<T>(callback: () => T) {
4 const dispose = autorun(() => {
5 callback();
6 });
7
8 dispose();
9}
10
11export function autorunOnce(callback: () => void) {
12 const stop = autorun(callback);

Callers 2

query.spec.tsFile · 0.90

Calls 1

disposeFunction · 0.85

Tested by

no test coverage detected