MCPcopy
hub / github.com/Nutlope/self.so / dispatch

Function dispatch

components/ui/use-toast.ts:133–138  ·  view source on GitHub ↗
(action: Action)

Source from the content-addressed store, hash-verified

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

Callers 5

addToRemoveQueueFunction · 0.70
updateFunction · 0.70
dismissFunction · 0.70
toastFunction · 0.70
useToastFunction · 0.70

Calls 1

reducerFunction · 0.70

Tested by

no test coverage detected