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

185
Vistas
Reactjs : Getting a input value from many inputs

Im trying to get some input value from a library(https://www.npmjs.com/package/react-auth-code-input) , but im getting an error TypeError: Cannot read properties of undefined (reading 'value')

code :

  {...}
const Login = ({loginUser}) =>{
  const history = useHistory();
  const [showPopup, setShowPopup] = useState(false);
  const [Token,setToken] =useState(0);


  return (
    <div>
      <StyledFormArea>
        <TextLink to="/home">
           {...}
 <AuthCode
                          characters={6}
                          onChange= {e => setToken(e.target.value)}
                          containerClassName="Input"
                          inputClassName="input"
                        />
{...}

someone knows an function that gets more than one input value ?

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

0

The onChange method from the library definition tells you that the return value is the a string (assuming it’s the input string value), no the event. So instead of e.target.value it would just be e (I would rename this :) )

For reference here is the definition of the onChange method implementation from the library (found here)

Callback function called every time an input value changes

So the onChange Will give you the text value of the input.

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