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

158
Vistas
';' 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 Respuestas
Responde la pregunta

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 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