📜  React Redux 商店示例 - Javascript 代码示例

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

代码示例1
import { createStore, applyMiddleware } from 'redux';
import { composeWithDevTools } from "redux-devtools-extension";
import thunk from 'redux-thunk';
import rootReducer from './reducers';

const initialState = {};

const middleware = [thunk];

const store = createStore(
  rootReducer,
  initialState,
  composeWithDevTools(applyMiddleware(...middleware))
);

export default store;