import { configureStore } from "@reduxjs/toolkit";
// 导入counter模块下的reducer函数
import counterReducer from "./features/counter";
import navigationReducer from "./features/navigation";
import userInfoReducer from "./features/userInfo";
import globalStoreReducer from "./features/globalStore";
import otherSettingReducer from "./features/otherSetting";
import instrumentReducer from "./features/instrument";

const store = configureStore({
  reducer: {
    // 每个reducer都可以理解成一个子仓库
    counter: counterReducer,
    navigation: navigationReducer,
    userInfo: userInfoReducer,
    globalStore: globalStoreReducer,
    otherSetting: otherSettingReducer,
    instrument: instrumentReducer,
  },
});

export default store;
