| ```typescript | |
| import { configureStore } from '@reduxjs/toolkit' | |
| import authSlice from './slices/authSlice' | |
| import themeSlice from './slices/themeSlice' | |
| import videoSlice from './slices/videoSlice' | |
| import channelSlice from './slices/channelSlice' | |
| import searchSlice from './slices/searchSlice' | |
| import uiSlice from './slices/uiSlice' | |
| export const store = configureStore({ | |
| reducer: { | |
| auth: authSlice, | |
| theme: themeSlice, | |
| videos: videoSlice, | |
| channels: channelSlice, | |
| search: searchSlice, | |
| ui: uiSlice, | |
| }, | |
| middleware: (getDefaultMiddleware) => | |
| getDefaultMiddleware({ | |
| serializableCheck: { | |
| ignoredActions: ['persist/PERSIST', 'persist/REHYDRATE'], | |
| }, | |
| }), | |
| }) | |
| export type RootState = ReturnType<typeof store.getState> | |
| export type AppDispatch = typeof store.dispatch | |
| ``` |