-
Notifications
You must be signed in to change notification settings - Fork 1
/
store.ts
34 lines (31 loc) · 889 Bytes
/
store.ts
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
import { configureStore } from '@reduxjs/toolkit';
import {
addressBarSizeSlice,
cardModalSlice,
collectionSlice,
configSlice,
decksSlice,
gameOverSlice,
popupOverlaysSlice,
windowSizeSlice,
zonesRefSlice,
zonesSlice,
} from './features';
export const store = configureStore({
reducer: {
addressBarSize: addressBarSizeSlice,
cardModal: cardModalSlice,
collection: collectionSlice,
config: configSlice,
decks: decksSlice,
gameOver: gameOverSlice,
popupOverlays: popupOverlaysSlice,
windowSize: windowSizeSlice,
zones: zonesSlice,
zonesRef: zonesRefSlice,
},
});
// 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;