controlForm/src/store/store.ts
2023-03-13 22:26:59 +03:00

25 lines
541 B
TypeScript

import {configureStore, combineReducers} from "@reduxjs/toolkit";
import { reducer as formReducer } from 'redux-form'
// import formSlice from "./reducers/formSlice";
const rootReducer = combineReducers({
form: formReducer,
// control: formSlice,
});
export const setupStore = () => {
return configureStore(
{
reducer: rootReducer,
})
};
export type RootState = ReturnType<typeof rootReducer>
export type AppStore = ReturnType<typeof setupStore>
export type AppDispatch = AppStore['dispatch']