My code looks like
@connect((store)=>{
return{
obj:store.obj
}
})
class ParentComponent extends React.Component{
render(){
return(
<ChildComponent/>
)
}
}
Store change is causing re-rendering of ParentComponent
which is fine. But the issue is, it's triggering componentDidMount
in ChildComponent
each time the ParentComponent
is re-rendering. I am really not sure what I am missing here.
NOTE: The issue is reproducible only in react production build. Working fine in React Dev build.