React:快速上手(7)——使用中间件实现异步操作 本文参考链接:Stack Overflow redux-thunk 我们使用store.dispath进行派发时,只能传递一个普通对象进去,如下: store.dispatch({ type: 'INCREMENT' }) 但是,在使用redux-thunk中间件后,我们就可以传递一个函数进去 import { createStore, applyMiddleware } from 'redux' import thunk from 'red…