No se utiliza mecanografiado. ¿Por qué recibo este error? No ocurre en ningún otro componente. He mirado las respuestas de otros interrogadores pero no he encontrado ninguna información útil. ¿Puede alguien por favor ayudarme?
Los errores correspondientes ocurren en la ubicación de la función constructora, la ubicación de la función shouldComponentUpdate y la ubicación de la función de representación.
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;
};