Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Typescript error in TextArea : Type 'string' is not assignable to type number

<textarea rows='3' 
  className='form-control' 
  placeholder='Enter About your description'/>

The expected type comes from property 'rows' which is declared here on type 'DetailedHTMLProps, HTMLTextAreaElement>'

screenshot

like image 996
Vitaly Kuprin Avatar asked Dec 10 '22 01:12

Vitaly Kuprin


1 Answers

Try this:

<textarea rows={3} 
  className='form-control' 
  placeholder='Enter About your description'/>
like image 104
Łukasz Karczewski Avatar answered May 16 '23 05:05

Łukasz Karczewski