turkmen-expo/redux/store.ts

32 lines
914 B
TypeScript
Raw Permalink Normal View History

2025-10-12 17:42:17 +00:00
import { configureStore } from "@reduxjs/toolkit";
import headerSlice from "./slices/headerSlice";
import homeSlice from "./slices/homeSlice";
import contactsSlice from "./slices/contactsSlice";
import faqSlice from "./slices/faqSlice";
import bidSlice from "./slices/bidSlice";
import inputSlice from "./slices/inputSlice";
import burgerSlice from "./slices/burgerSlice";
import aboutSlice from "./slices/aboutus";
export const makeStore = () => {
return configureStore({
reducer: {
headerSlice,
homeSlice,
contactsSlice,
faqSlice,
bidSlice,
inputSlice,
burgerSlice,
aboutSlice,
},
});
};
// Infer the type of makeStore
export type AppStore = ReturnType<typeof makeStore>;
// Infer the `RootState` and `AppDispatch` types from the store itself
export type RootState = ReturnType<AppStore["getState"]>;
export type AppDispatch = AppStore["dispatch"];