mirror of
https://github.com/Mastermindzh/react-starter-kit.git
synced 2025-04-11 09:35:08 +02:00
18 lines
453 B
TypeScript
18 lines
453 B
TypeScript
import { configureStore, ThunkAction, Action } from "@reduxjs/toolkit";
|
|
import counterReducer from "../features/counter/state/counterSlice";
|
|
|
|
export const store = configureStore({
|
|
reducer: {
|
|
counter: counterReducer,
|
|
},
|
|
});
|
|
|
|
export type AppDispatch = typeof store.dispatch;
|
|
export type RootState = ReturnType<typeof store.getState>;
|
|
export type AppThunk<ReturnType = void> = ThunkAction<
|
|
ReturnType,
|
|
RootState,
|
|
unknown,
|
|
Action<string>
|
|
>;
|