13 lines
488 B
TypeScript
13 lines
488 B
TypeScript
import { configureStore } from '@reduxjs/toolkit';
|
|
import { useDispatch, useSelector } from 'react-redux';
|
|
|
|
// Каркас: слайсы добавляются срезами в ./slices.
|
|
export const store = configureStore({
|
|
reducer: {},
|
|
});
|
|
|
|
export type RootState = ReturnType<typeof store.getState>;
|
|
export type AppDispatch = typeof store.dispatch;
|
|
export const useAppDispatch = useDispatch.withTypes<AppDispatch>();
|
|
export const useAppSelector = useSelector.withTypes<RootState>();
|