blob: 3c670341418b889120679eaeebc8d91563069938 [file] [log] [blame]
simond47ef9e2022-09-28 22:24:28 -04001import { configureStore } from '@reduxjs/toolkit';
simon07b4eb02022-09-29 17:50:26 -04002
simond47ef9e2022-09-28 22:24:28 -04003import appReducer from './appSlice';
idillond858c182022-09-16 13:18:26 -04004
5export const store = configureStore({
6 reducer: {
7 app: appReducer,
8 },
9});
10
11// Infer the `RootState` and `AppDispatch` types from the store itself
12export type RootState = ReturnType<typeof store.getState>;
13// Inferred type: {posts: PostsState, comments: CommentsState, users: UsersState}
14export type AppDispatch = typeof store.dispatch;