UNPKG

@chowdhury/vite-react-redux-ts-starter

Version:

A starter template for React with Typescript using Vite and Redux

18 lines (15 loc) 447 B
import { Action, ThunkAction, 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<typeof store.getState>; export type AppThunk<ReturnType = void> = ThunkAction< ReturnType, RootState, unknown, Action<string> >;