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

Function dispatch

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

Source from the content-addressed store, hash-verified

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

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