When using the configureStore from the redux-toolkit project, the pass through of the already added reducers to the enhancer isn't working. So adding a reducer when a route is resolved, will result in a state with only the added reducer and not the previously added reducers. I wrote a fix for this problem:
This fix would change the API of the lazyReducerEnhancer. You now need to pass the initial reducers added with the configureStore from the redux-toolkit.
When using the configureStore from the redux-toolkit project, the pass through of the already added reducers to the enhancer isn't working. So adding a reducer when a route is resolved, will result in a state with only the added reducer and not the previously added reducers. I wrote a fix for this problem:
This fix would change the API of the
lazyReducerEnhancer
. You now need to pass the initial reducers added with the configureStore from the redux-toolkit.