19 lines
519 B
TypeScript
19 lines
519 B
TypeScript
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<typeof store.getState>;
|
|
|
|
// Type definition for dispatch, can be used with useDispatch hook
|
|
export type AppDispatch = typeof store.dispatch;
|