Here is my main js code and why combine all reducer cartredux\src\redux\reducers\main.js
import {combineReducers} from "react-redux";
import { cartreducer } from "./reducer";
const rootred = combineReducers({
cartreducer
});
export default rootred;
As a comment pointed out: the
combineReducersfunction is part of either the@reduxjs/toolkitorreduxpackages, because it's about the non-UI portion of the logic. It's not part of thereact-reduxpackage, which is specifically about React UI integration with Redux.