store.ts 512 B

123456789101112131415161718
  1. import rootLayoutSlice from '@/layouts/RootLayout/rootLayoutSlice';
  2. import { configureStore } from '@reduxjs/toolkit';
  3. const store = configureStore({
  4. reducer: {
  5. rootLayout: rootLayoutSlice,
  6. },
  7. middleware: (getDefaultMiddleware) =>
  8. getDefaultMiddleware({
  9. // 取消序列化告警显示
  10. serializableCheck: false,
  11. }),
  12. });
  13. export default store;
  14. export type RootState = ReturnType<typeof store.getState>;
  15. export type AppDispatch = typeof store.dispatch;