MCPcopy Index your code
hub / github.com/sourcebot-dev/sourcebot / dispatch

Function dispatch

packages/web/src/components/hooks/use-toast.ts:136–141  ·  view source on GitHub ↗
(action: Action)

Source from the content-addressed store, hash-verified

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

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