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