MCPcopy
hub / github.com/jamiepine/voicebox / dispatch

Function dispatch

app/src/components/ui/use-toast.ts:125–130  ·  view source on GitHub ↗
(action: Action)

Source from the content-addressed store, hash-verified

123let memoryState: State = { toasts: [] };
124
125function dispatch(action: Action) {
126 memoryState = reducer(memoryState, action);
127 listeners.forEach((listener) => {
128 listener(memoryState);
129 });
130}
131
132type Toast = Omit<ToasterToast, 'id'>;
133

Callers 5

addToRemoveQueueFunction · 0.85
updateFunction · 0.85
dismissFunction · 0.85
toastFunction · 0.85
useToastFunction · 0.85

Calls 1

reducerFunction · 0.85

Tested by

no test coverage detected