import { configureStore } from '@reduxjs/toolkit' import { useDispatch, useSelector } from 'react-redux' import type { TypedUseSelectorHook } from 'react-redux' import { appReducer } from './appSlice' import { documentReducer } from './documentSlice' export const store = configureStore({ reducer: { app: appReducer, document: documentReducer, }, middleware: (getDefaultMiddleware) => getDefaultMiddleware({ serializableCheck: false, immutableCheck: true, }), devTools: true, }) export type RootState = ReturnType export type AppDispatch = typeof store.dispatch export const useAppDispatch: () => AppDispatch = useDispatch export const useAppSelector: TypedUseSelectorHook = useSelector