-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstore.ts
More file actions
19 lines (17 loc) · 689 Bytes
/
store.ts
File metadata and controls
19 lines (17 loc) · 689 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { configureStore } from '@reduxjs/toolkit';
import counterReducer from './slices/counterSlice';
import medicineReducer from './slices/medicineSlice';
import userReducer from './slices/userSlice';
import postUserReducer from './slices/postUser';
export const store = configureStore({
reducer: {
counter: counterReducer,
medicine: medicineReducer,
user: userReducer,
postUser: postUserReducer,
},
});
// Infer the `RootState` and `AppDispatch` types from the store itself
export type RootState = ReturnType<typeof store.getState>;
// Inferred type: {posts: PostsState, comments: CommentsState, users: UsersState}
export type AppDispatch = typeof store.dispatch;