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

115
Vistas
Does change in each independent state in functional component triggers a render for the component in React?

When we have multiple independent states in a component then if I change any one of them, will it trigger a re-render of the entire component?

Initialise const [email, setEmail] = useState('') const [val, setVal] = useState(true)

Update setVal(false)

Will this render the whole component again?

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

0

Yes the Component will be rendered again. Let me add: Although if you have two states changing (almost) simultanously the state update will be batched. In React 18 React batches state updates in React events handlers, promises, setTimeout and native event handlers resulting in only one rerender.

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