Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

138
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda