I have a used react-boilerplate to setup the base for my project. Consider I have a container and 2 components(dumb components) like below,
App
- HomePage(Connected component with sidebarData and detailedData)
- SideBar(data=sidebarData)
- DetailedView(data=detailedData)
State
{
"sidebarData": makeSelectorSideBarData(), // reselect selector
"detailedData": makeSelectorDetailedViewData(), // reselect selector
}
It's clear that the child components are depends on individual data. But when my detailedData
changes, it re-renders the SideBar
component also.
Is there anyway to avoid this using redux/reselect and without implementing shouldComponentUpdate()
?