Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

184
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda