xianyuxmu

Results 2 comments of xianyuxmu

@monkindey `redux-thunk` 应该是改造了 `store.dispatch` 方法,使得 `store.dispatch` 可以接受函数作为参数。接着,`redux-thunk` 使用了 `Promise` 来实现串行执行 Action。

看了源代码了,确实不是使用 Promise: function createThunkMiddleware(extraArgument) { return ({ dispatch, getState }) => next => action => { if (typeof action === 'function') { `return action(dispatch, getState, extraArgument);` } return next(action); };...