I am trying to understand why/how this comparison gets true? As I know, if there is/are function/s in objects it will never be equal because every time parent renders their references change. Why does this equal?
// _.isEqual comes from lodash
shouldComponentUpdate(nextProps){
const myQuestion = _.isEqual(nextProps, this.props) // this is getting true and my question for this line
return !_.isEqual(nextProps, this.props)
}
// this is my props
{
"dispatch": function(){},
"saveHeaderSettings": function(){},
"buttonFormat": "absolute",
"externalUpdateEnable": false,
"isEditModeAllowed": true,
"isVisiblePivotView": false,
"isWorkInSubsetEnabled": false,
"mode": 0,
"rowUpdateEnable": false,
"updateMode": 0,
"updateModes": {
"isVisibleCellUpdate": true,
"isVisibleRowUpdate": true,
"isVisiblePopupUpdate": true
}
}
PS: dispatch and saveHeaderSettings methods are coming from Redux's mapDispatchToProps