MCPcopy
hub / github.com/midday-ai/midday / dispatch

Function dispatch

packages/ui/src/components/use-toast.tsx:147–152  ·  view source on GitHub ↗
(action: Action)

Source from the content-addressed store, hash-verified

145let memoryState: State = { toasts: [] };
146
147function dispatch(action: Action) {
148 memoryState = reducer(memoryState, action);
149 for (const listener of listeners) {
150 listener(memoryState);
151 }
152}
153
154type Toast = Omit<ToasterToast, "id"> & { id?: string };
155

Callers 5

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

Calls 2

reducerFunction · 0.85
listenerFunction · 0.85

Tested by

no test coverage detected