You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailchat/shared/redux/store.ts

16 lines
429 B
TypeScript

import { configureStore } from '@reduxjs/toolkit';
import { appReducer } from './slices';
export function createStore() {
const store = configureStore({
reducer: appReducer,
middleware: (getDefaultMiddleware) => getDefaultMiddleware(),
devTools: process.env.NODE_ENV !== 'production',
});
return store;
}
export type AppStore = ReturnType<typeof createStore>;
export type AppDispatch = AppStore['dispatch'];