Description
We have 2 components, one is parent and one is child. Both components have its own slice. When the child component is rendered for the first time, a warning will be thrown in the console:

This is caused by useInjectReducer hook. My interpretation of the issue is that the hook make change to the store, affecting both the parent and the child component.
https://github.com/react-boilerplate/redux-injectors/blob/master/src/injectReducer.js#L69

This is briefly mentioned at the end in #54 , after it is closed.
This issue in react-redux seems to be related reduxjs/react-redux#1640.
Steps to reproduce
- Create two components with separate injected reducers
- Nest one component in the other
- Start react app and navigate to route that render both component
- Check warning in the console.
Versions
- react-boilerplate-cra-template: current
- Node/NPM: 16.15.1
- Browser: Chrome
Description
We have 2 components, one is parent and one is child. Both components have its own slice. When the child component is rendered for the first time, a warning will be thrown in the console:
This is caused by
useInjectReducerhook. My interpretation of the issue is that the hook make change to the store, affecting both the parent and the child component.https://github.com/react-boilerplate/redux-injectors/blob/master/src/injectReducer.js#L69

This is briefly mentioned at the end in #54 , after it is closed.
This issue in react-redux seems to be related reduxjs/react-redux#1640.
Steps to reproduce
Versions