ManagementSystem/FRONTEND/src/rtk/store.ts

18 lines
517 B
TypeScript
Executable File

import { configureStore } from '@reduxjs/toolkit'
import { authenticationReducer } from '@/rtk/slices/auth'
export const store = configureStore({
reducer: {
authentication: authenticationReducer,
},
devTools: process.env.NODE_ENV === 'development',
middleware: (getDefaultMiddleware) =>
getDefaultMiddleware({
serializableCheck: false,
immutableCheck: false,
}).concat([]),
})
export type AppDispatch = typeof store.dispatch
export type RootState = ReturnType<typeof store.getState>