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

Function loop

src/loop.js:21–27  ·  view source on GitHub ↗
(model, cmd)

Source from the content-addressed store, hash-verified

19};
20
21export const loop = (model, cmd) => {
22 if (process.env.NODE_ENV === 'development') {
23 throwInvariant(isCmd(cmd), 'Given cmd is not an Cmd instance.');
24 }
25
26 return [model, cmd];
27};
28
29export const liftState = (state) => {
30 return isLoop(state) ? state : loop(state, Cmd.none);

Callers 15

adderCmdFunction · 0.90
multiplierCmdFunction · 0.90
prop1ReducerFunction · 0.90
reducerFunction · 0.90
loop.spec.jsFile · 0.90
adderCmdFunction · 0.90
multiplierCmdFunction · 0.90
dividerCmdFunction · 0.90
combineReducersFunction · 0.90

Calls 2

throwInvariantFunction · 0.90
isCmdFunction · 0.90

Tested by 7

adderCmdFunction · 0.72
multiplierCmdFunction · 0.72
prop1ReducerFunction · 0.72
reducerFunction · 0.72
adderCmdFunction · 0.72
multiplierCmdFunction · 0.72
dividerCmdFunction · 0.72