标签: redux react-redux
我喜欢使用分派返回承诺的想法
dispatch({type: 'SOME SAGA TYPE'}).then(()=>{ // other logics })
我创建了这个中间件来在调度中返回承诺,但是,我无法使其工作。根本无法调度吗?
const middleware = store => next => action => { next(action); return new Promise(resolve => resolve(action)); };