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

156
Vistas
React Context is not passing 1/2 fields

So I'm learning how to use React context, I have found this example which is very helpful: https://codesandbox.io/s/login-flow-w-react-context-api-p9j96?file=/src/Login/index.js

Since useSetState can no longer be used, I tried to import useState from react, but it doesn't work the same, useState only passing password to the login function, as can be seen here:

https://codesandbox.io/s/login-flow-w-react-context-api-forked-njs1kt?file=/src/Login/index.js

Console also threw this error:

A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component.

Anyway I can fix this? Thank you guys so much, and happy holiday!!

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