MCPcopy Create free account
hub / github.com/Roy3838/Observer / broadcast

Function broadcast

app/src/utils/pullModelManager.ts:35–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33
34// Notifies all subscribed components about a state change.
35const broadcast = () => {
36 listeners.forEach(listener => listener(state));
37};
38
39const setState = (newState: Partial<PullState>) => {
40 state = { ...state, ...newState };

Callers 1

setStateFunction · 0.85

Calls 1

listenerFunction · 0.50

Tested by

no test coverage detected