MCPcopy
hub / github.com/nraiden/openv0 / dispatch

Function dispatch

webapps-starters/react/shadcn/src/components/ui/use-toast.tsx: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