MCPcopy Create free account
hub / github.com/hashintel/hash / set

Function set

libs/@hashintel/petrinaut/src/react/create-value-store.ts:13–21  ·  view source on GitHub ↗
(next)

Source from the content-addressed store, hash-verified

11 return {
12 getSnapshot: () => current,
13 set(next) {
14 if (Object.is(current, next)) {
15 return;
16 }
17 current = next;
18 for (const listener of listeners) {
19 listener();
20 }
21 },
22 subscribe(listener) {
23 listeners.add(listener);
24 return () => {

Callers

nothing calls this directly

Calls 2

listenerFunction · 0.85
isMethod · 0.80

Tested by

no test coverage detected