Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 1x 1x 1x 1x | import ReduxWrapper from "../../../source"; import component from "./component"; const wrapper = new ReduxWrapper({ called: "home" }); wrapper .add({ initState: { count: 5 } }) .add({ component }) .add({ decrement: { fn: (state, by) => ({ ...state, count: state.count - value }), withSaga: { takeEvery: function*(action) { const { put, result } = action; console.log("Home : saga : action -", action); put({ ...result, by: 1 }); }, andSagaEffects: ["take", "put", "apply", "cps"] } } }); /* * * Exports. * */ export default wrapper.connection; export const reducer = wrapper.reducer; export const saga = wrapper.saga; |