-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
store.tsx
35 lines (28 loc) · 966 Bytes
/
store.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { configureStore, /*combineReducers*/ } from "@reduxjs/toolkit";
import userReducer from './src/reducers/userSlice';
import cardReducer from "./src/reducers/cardSlice";
import dataReducer from "./src/reducers/dataSlice";
// import { persistReducer, persistStore } from 'redux-persist'
// import storage from 'redux-persist/lib/storage';
// const persistConfig = {
// key: 'root',
// storage,
// };
// const rootReducer = combineReducers({
// user: userReducer,
// card: cardReducer,
// data: dataReducer,
// });
// const persistedReducer = persistReducer(persistConfig, rootReducer);
const store = configureStore({
reducer: {
user: userReducer,
card: cardReducer,
data: dataReducer,
}
// reducer: persistedReducer,
})
export type RootState = ReturnType<typeof store.getState>;
export type AppDispatch = typeof store.dispatch
// export const persistor = persistStore(store);
export default store