docs: ✏️ 新增了一段注释
This commit is contained in:
@@ -1,3 +1,23 @@
|
|||||||
|
// 古老写法
|
||||||
|
// // 1. 导入原始 Redux 的核心函数
|
||||||
|
// import { createStore, combineReducers } from 'redux';
|
||||||
|
// // 2. 导入 reducers(保持不变)
|
||||||
|
// import loadingReducer from "./slices/loadingSlice";
|
||||||
|
// import studentReducer from "./slices/studentSlice";
|
||||||
|
|
||||||
|
// // 3. 合并 reducers
|
||||||
|
// const rootReducer = combineReducers({
|
||||||
|
// loading: loadingReducer,
|
||||||
|
// student: studentReducer,
|
||||||
|
// });
|
||||||
|
|
||||||
|
// // 4. 创建 store(原始 Redux 方式)
|
||||||
|
// export default createStore(
|
||||||
|
// rootReducer,
|
||||||
|
// // 可选:添加 Redux DevTools 支持
|
||||||
|
// window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
|
||||||
|
// );
|
||||||
|
|
||||||
import { configureStore } from "@reduxjs/toolkit";
|
import { configureStore } from "@reduxjs/toolkit";
|
||||||
import loadingReducer from "./slices/loadingSlice";
|
import loadingReducer from "./slices/loadingSlice";
|
||||||
import studentReducer from "./slices/studentSlice";
|
import studentReducer from "./slices/studentSlice";
|
||||||
|
|||||||
Reference in New Issue
Block a user