深入研究Redux中间件,并探索Redux-Thunk。
中间件的入口点— applyMiddleware 使用redux实用程序applyMiddleware将中间件引入到redux设置中。 applyMiddleware接受所有中间件,组成它们,并允许操作在到达applyMiddleware之前通过它。 这是我们使用applyMidlleware应用中间件的方法: import { applyMiddleware } from "redux"; const store = createStore( reducers, initialState, applyMiddleware(…