MCPcopy
hub / github.com/Nutlope/logocreator / dispatch

Function dispatch

hooks/use-toast.ts:134–139  ·  view source on GitHub ↗
(action: Action)

Source from the content-addressed store, hash-verified

132let memoryState: State = { toasts: [] };
133
134function dispatch(action: Action) {
135 memoryState = reducer(memoryState, action);
136 listeners.forEach((listener) => {
137 listener(memoryState);
138 });
139}
140
141type Toast = Omit<ToasterToast, "id">;
142

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