(model, cmd)
| 19 | }; |
| 20 | |
| 21 | export 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 | |
| 29 | export const liftState = (state) => { |
| 30 | return isLoop(state) ? state : loop(state, Cmd.none); |