import { configureStore } from "@reduxjs/toolkit"; import "@/lib/features/people/personSlice"; import personReducer from "./features/people/personSlice"; export const makeStore = () => { return configureStore({ reducer: { people: personReducer }, }); }; // Infer the type of makeStore export type AppStore = ReturnType; // Infer the `RootState` and `AppDispatch` types from the store itself export type RootState = ReturnType; export type AppDispatch = AppStore["dispatch"];