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

177
Visualizações
TypeError: Cannot read properties of undefined (reading '(Function Name)') but works for all

It works for all but this didn't, I had all for this following code:

constructor(props) {
 super(props);
  this.state = {
   addchange: ''
  }
 this.handleInputAddChange = this.handleInputAddChange.bind(this);
}
handleInputAddChange = (e) => {
 e.preventDefault();
  this.setState({
   [e.target.name]: e.target.value
  })
}
<input type="text" name="addchange" onChange={this.handleInputAddChange} />

and pops ups the weird error, and for the last time I doubled check that most of my code like this works but this appeared React.js's error screen like this:

TypeError: Cannot read properties of undefined (reading 'handleInputAddChange')

Note that its the same format from my other code like this. and its weird why it didn't work in this one anymore.

about 4 years ago · Juan Pablo Isaza
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