redux-thunk中间件处理异步操作 hymnken 2023-03-28 73 阅读1分钟 安装 npm i redux-thunk 然后引入 还要有applyMiddleware 如果有多个中间件,逗号隔开引入即可 改成如图写法 抽离这个方法 使用 也可以将dispatch写在组件中