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.
18 lines
543 B
TypeScript
18 lines
543 B
TypeScript
4 years ago
|
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>;
|
||
4 years ago
|
export type AppState = ReturnType<AppStore['getState']>;
|
||
4 years ago
|
export type AppDispatch = AppStore['dispatch'];
|
||
4 years ago
|
export { Provider as ReduxProvider } from 'react-redux';
|