I have only one connected component at the top level for the whole application.
I made some tests, and the problem is the following:
I have 2 reducers (locale and products). Only one of them is connected to the app with mapStateToProps.
const mapStateToProps = state => ({
locale: state.get('locale'),
});
But if I update the products reducer that is not connected to the app, The mapStateToProps is anyway called and so on it will trigger my application re-rendering !
Why this behavior since products is for sure updated on my store but is not connected to the app ???
Normally it should skip the re-rendering process since that state part is not mapped to any props.
Versions:
"react-redux": "^4.4.5",
"redux": "^3.5.2",
I have only one
connected component at the top level for the whole application.I made some tests, and the problem is the following:
I have 2 reducers (locale and products). Only one of them is connected to the app with
mapStateToProps.But if I update the
productsreducer that is not connected to the app, ThemapStateToPropsis anyway called and so on it will trigger my application re-rendering !Why this behavior since
productsis for sure updated on my store but is not connected to the app ???Normally it should skip the re-rendering process since that state part is not mapped to any props.
Versions:
"react-redux": "^4.4.5",
"redux": "^3.5.2",