MCPcopy
hub / github.com/chronark/highstorm / dispatch

Function dispatch

apps/web/hooks/use-toast.ts:128–133  ·  view source on GitHub ↗
(action: Action)

Source from the content-addressed store, hash-verified

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

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