MCPcopy
hub / github.com/redux-loop/redux-loop / dispatch

Function dispatch

src/install.js:57–65  ·  view source on GitHub ↗
(action)

Source from the content-addressed store, hash-verified

55 }
56
57 function dispatch(action) {
58 if (loopConfig.ENABLE_THUNK_MIGRATION && typeof action === 'function') {
59 return action(dispatch, store.getState);
60 }
61 const result = store.dispatch(action);
62 const cmdsToRun = cmdsQueue;
63 cmdsQueue = [];
64 return runCmds(cmdsToRun).then(() => result);
65 }
66
67 function replaceReducer(reducer) {
68 return store.replaceReducer(liftReducer(reducer));

Callers 4

index.jsFile · 0.85
doubleThunkFunction · 0.85
thunkFunction · 0.85
dispatchNoopFunction · 0.85

Calls 2

actionFunction · 0.85
runCmdsFunction · 0.85

Tested by 2

doubleThunkFunction · 0.68
thunkFunction · 0.68