I need to update multiple properties on my application state with single reducer. Later I'm using combineReducers
redux helper that combines all the reducers. Problem is, all the other reducers operate one level down from the root of the state (that is, on a property), except this one that I need to pass the whole state to.
How do I use the combineReducers
function to pass the root state?
const App = combineReducers({
pages: combineReducers({
browse: combineReducers({
numOfItems: loadMoreItems,
filter: setFilter
})
}),
<rootState>: openPage,
favoriteItems: addItemToFavorites,
inBasketItems: addItemToBasket
})
What do I place in <rootState>
?