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

149
Vistas
Does change in Props Data Change the state of components or will it render the change?

I am currently learning React js, and the differences between props and States are apparent.

But will the change in data passed in the prop cause the component to re-render or will it still be static with the data passed initially?

I still have reservations on props values changes, if it does cause a re-render of the component(not changing the data within the components)?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

A change in props will cause a re-render.

If you do not want this you can use a state like this:

const Component = (props) => {
  const [firstRenderProps] = useState(props);

firstRenderProps will always have the same value after a re-render

about 4 years ago · Juan Pablo Isaza 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