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

Function liftReducer

src/install.js:17–22  ·  view source on GitHub ↗
(reducer)

Source from the content-addressed store, hash-verified

15 let cmdsQueue = [];
16
17 const liftReducer = (reducer) => (state, action) => {
18 const result = reducer(state, action);
19 const [model, cmd] = liftState(result);
20 cmdsQueue.push({ originalAction: action, cmd });
21 return model;
22 };
23
24 const store = next(liftReducer(reducer), initialModel, enhancer);
25

Callers 2

installFunction · 0.85
replaceReducerFunction · 0.85

Calls 2

liftStateFunction · 0.90
reducerFunction · 0.85

Tested by

no test coverage detected