Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

164
Views
';' 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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!