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

135
Vistas
Why is a Component Re-Rendering done when changing the value of the props sent to child Component (react js)?

I am having a problem understanding Rerender in React I read in the documentation that the Renderer occurs when there is a change in the state I also read in this article that (https://blog.logrocket.com/a-guide-to-usestate-in-react-ecb9952e406c/) when I pass props to another component and then receive the rubes with a ballistic outside the useEffect, when a change occurs in the value of the props, the change will not be reflected in the component that receives the props. But when the value of the props is received in a normal variable when there is a change in the value of the props, it performs a rerender and the change is reflected immediately See this example <<https://codesandbox.io/s/blissful-chatelet-xxb34?file=/src/App.js>> Please clear this up for me, thank you

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

When will a Component Re-render

  1. When the value of any of its state changes (Class or Functional Component)
  2. When the value of the props that is send by Parent changes (Class of Functional Componnent).

So, this is the basic concept of re-render!

Exceptions

You might decide that if the props that are being sent by parent, are NOT used in your component, in that case you might decide to make your component as PURE COMPONENT, and only in that case the changes in props won't rerender your child-component!

Also Read: Why React's PureComponent is recommended to have all its children "pure"

about 4 years ago · Santiago Trujillo Denunciar
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