import {configureStore} from '@reduxjs/toolkit'; import {userSlice} from './slices'; // Configure the main store const store = configureStore({ reducer: { // Add the reducer from your slice to the store user: userSlice.reducer } }); export default store; // Type definition for the root state, can be used with useSelector hook export type RootState = ReturnType; // Type definition for dispatch, can be used with useDispatch hook export type AppDispatch = typeof store.dispatch;