const thunk = ({dispatch, getState}) => next => action => { if(typeof action === 'function'){ return action(dispatch, getState); } return next(action); }
使用Generator
← 16-react-redux.md 18-Redux中间件原理.md →