MCPcopy
hub / github.com/stackryze/FreeDomains / dispatch

Function dispatch

src/hooks/use-toast.js:78–83  ·  view source on GitHub ↗
(action)

Source from the content-addressed store, hash-verified

76const listeners = [];
77let memoryState = { toasts: [] };
78function dispatch(action) {
79 memoryState = reducer(memoryState, action);
80 listeners.forEach((listener) => {
81 listener(memoryState);
82 });
83}
84function toast({ ...props }) {
85 const id = genId();
86 const update = (props2) => dispatch({

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