forked from v1p3r75/friedshop-front-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstore.ts
19 lines (17 loc) · 860 Bytes
/
store.ts
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 { productCartSlice, productSlice, productWhishListSlice } from "./src/store/productSlice";
import { productApiSice } from "./src/store/apiquery/productApiSlice";
export const store = configureStore({
reducer : {
[productApiSice.reducerPath] : productApiSice.reducer,
products : productSlice.reducer,
productWishlist : productWhishListSlice.reducer,
productCart : productCartSlice.reducer
},
middleware: (getDefaultMiddleware) =>
getDefaultMiddleware().concat(productApiSice.middleware),
})
// 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