📜  如何集成 redux 开发工具以响应应用程序 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:22.846000             🧑  作者: Mango

代码示例2
import { createStore, applyMiddleware, compose } from 'redux';

 const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
 const store = createStore(reducer, /* preloadedState, */ composeEnhancers(
    applyMiddleware(...middleware)
  ));