Closed olabala closed 2 years ago
try this demo https://codesandbox.io/s/dynamic-module-e5tf0?file=/src/modules/reducer.js
The use of put should be able to trigger to root add, but in reality it does not, need to use call to make the function work
// yield call(addNumberHandler, addNumber({ count: 1000 })); yield put(addNumber({ count: 1000 }));
after reading the source code, I think I've got the answer. we don't need to use sagaMiddleWare ourselves, just pass sagas to the module via createStore
try this demo https://codesandbox.io/s/dynamic-module-e5tf0?file=/src/modules/reducer.js
The use of put should be able to trigger to root add, but in reality it does not, need to use call to make the function work