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

163
Visualizações
';' expected.ts(1005) .I get an error and cannot run it

Here is a screenshot of the error

Typescript is not used. Why am I getting this error? It does not occur in any other component. I have looked at the answers of other questioners but have not found any useful information. Can someone please help me?

The corresponding errors occur at the constructor function location, the shouldComponentUpdate function location, and the render function location.

const RowTextarea = () => {
  constructor(props){
    super(props);
    this.textArea = null;
  }
  shouldComponentUpdate(nextProps){
    if(this.props.input.value !== nextProps.input.value){
      if(isEmpty(nextProps.input.value)){
        this.textArea.setAttribute('rows', this.props.rows);
      }else{
        this.textArea.setAttribute('rows', this.props.rows);
        while(this.textArea.scrollHeight > this.textArea.offsetHeight){
          const tempRows = Number(this.textArea.getAttribute('rows'));
          this.textArea.setAttribute('rows', tempRows + 1);
        }
      }
    }
  }
  return true;
};
about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Thank you all for sharing.

Changing from a function component to a class component worked. It was really helpful. Thank you very much.

about 4 years ago · Santiago Trujillo 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