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

Function reducer

test/index.spec.js:238–249  ·  view source on GitHub ↗
(state = initialState, action)

Source from the content-addressed store, hash-verified

236 fourthRun: false,
237 };
238 const reducer = (state = initialState, action) => {
239 switch (action.type) {
240 case 'FIRST_ACTION':
241 return loop(state, Cmd.run(thunk, { args: [Cmd.dispatch] }));
242
243 case 'DOWNSTREAM_ACTION':
244 return { ...state, secondRun: true };
245
246 default:
247 return state;
248 }
249 };
250 const store = createStore(reducer, initialState, install());
251
252 store.dispatch(firstAction).then((result) => {

Callers 4

reduce-reducers.tsFile · 0.85
liftReducerFunction · 0.85
reduce-reducers.jsFile · 0.85

Calls 1

loopFunction · 0.90

Tested by

no test coverage detected