Files
static-front/store/store.ts
T
Hamed 4cd34106b0
Build & Deploy (develop) / build-and-deploy (push) Successful in 2m23s
refactor: migrate project to TypeScript and translate comments to English
2026-09-14 13:27:17 +02:00

17 lines
474 B
TypeScript

import { configureStore } from '@reduxjs/toolkit';
import cartReducer from './cartSlice';
export const makeStore = () =>
configureStore({
reducer: {
cart: cartReducer,
},
});
// Singleton store for the client (App Router renders providers on the client tree).
export const store = makeStore();
export type AppStore = ReturnType<typeof makeStore>;
export type RootState = ReturnType<AppStore["getState"]>;
export type AppDispatch = AppStore["dispatch"];