blob: d28f3d0e2686dd95200d4c0470699a75ceb226a2 [file] [log] [blame]
import { configureStore } from "@reduxjs/toolkit";
import appReducer from "./appSlice";
export const store = configureStore({
reducer: {
app: appReducer,
},
});
// 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;