Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

136
Views
How do lodash's isEqual returns true while comparing two objects that have functions in Javascript/React?

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

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!