MCPcopy Create free account
hub / github.com/Seanium/ChatMap / dispatch

Function dispatch

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

Source from the content-addressed store, hash-verified

117let memoryState: State = { toasts: [] }
118
119function dispatch(action: Action) {
120 memoryState = reducer(memoryState, action)
121 listeners.forEach((listener) => {
122 listener(memoryState)
123 })
124}
125
126type Toast = Omit<ToasterToast, "id">
127

Callers 5

reducerFunction · 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