import type { Action, ThunkAction } from '@reduxjs/toolkit' import { configureStore } from '@reduxjs/toolkit' import { counterReducer } from '../features/counter/counterSlice' export const store = configureStore({ reducer: { counter: counterReducer, }, }) export type AppDispatch = typeof store.dispatch export type RootState = ReturnType export type AppThunk = ThunkAction< ReturnType, RootState, unknown, Action >