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

233
Vistas
A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value,

//constructor which i have initialised before only.

const [groupChatName, setGroupChatName] = useState();

// updated part where values is showing that it is undefined and it is changing from uncontrolled to controlled

<FormControl d="flex">
          <Input
            placeholder="Group Name"
            mb={3}
            value={groupChatName}
            onChange={(e) => setGroupChatName(e.target.value)}
          />
          <Button
            variant="solid"
            colorScheme="teal"
            ml={1}
            isLoading={renameloading}
            onClick={handleRename}
          >
            Update
          </Button>
        </FormControl>
about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

Use defaultValue={groupChatName} attribute instead of the value attribute. You can reference the docs here...uncontrolled-components

Hope this helped 😁

about 4 years ago · Juan Pablo Isaza Denunciar

0

You are passing undefined to the value prop in the Input component and then changing it to string on change.

Provide a initial value in useState

const [groupChatName, setGroupChatName] = useState("");
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