mirror of https://github.com/msgbyte/tailchat
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.
16 lines
429 B
TypeScript
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'];
|