blob: d28f3d0e2686dd95200d4c0470699a75ceb226a2 [file] [log] [blame]
idillond858c182022-09-16 13:18:26 -04001import { configureStore } from "@reduxjs/toolkit";
2import appReducer from "./appSlice";
3
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;