UNPKG

create-nxtstart-app

Version:

Nxtstart is an easy to use, interactive CLI tool to bootstrap your next web-based project. The template is aimed at students to get an easy access to web development with example implementations. It is also useful for experts to speed up prototyping.

19 lines (14 loc) 607 B
import { Action, combineReducers, configureStore, ThunkAction } from '@reduxjs/toolkit' import counterReducer from './slices/counterSlice' // further info: https://redux-toolkit.js.org/usage/nextjs const combinedReducer = combineReducers({ counter: counterReducer, }) export const makeStore = () => configureStore({ reducer: combinedReducer, }) export type AppStore = ReturnType<typeof makeStore> export type AppState = ReturnType<AppStore['getState']> export type AppDispatch = AppStore['dispatch'] export type AppThunk<ReturnType = void> = ThunkAction<ReturnType, AppState, unknown, Action>