export const makeStore = () => {
const store = configureStore({
reducer: {
reducer,
growthReportSlice,
selectBarSlice,
},
....
return store;
};
const dummy = makeStore();
export const wrapper = createWrapper(makeStore, { debug: true });
export type AppDispatch = typeof dummy.dispatch;
// export type RootReducer = ReturnType<typeof reducer> &
// ReturnType<typeof growthReportSlice> &
// ReturnType<typeof selectBarSlice>;
export const useAppDispatch = () => useDispatch<AppDispatch>();
I just need the ReturnType of the root reducer but I have 3 reducers combined. How can I get the correct typing?