listing-facebook/client/app/store/index.ts

13 lines
323 B
TypeScript

import { configureStore } from "@reduxjs/toolkit";
import appReducer from "./slices/app.slice";
export const store = configureStore({
reducer: {
app: appReducer,
},
});
// Export các type dùng trong app
export type RootState = ReturnType<typeof store.getState>;
export type AppDispatch = typeof store.dispatch;