typescript - How to add "colSpan" attribute in ReactJS -
i'm getting error "type string not assignable type number" when try add colspan="2" attribute below reactjs typescript code. how can fix this?
class productcategoryrow extends react.component<myprops, mystate> { constructor(props: myprops) { super(props); } render() { return (<div> <tr><th colspan="2">{ this.props.category }</th></tr> </div>); } //end render. } //end class.
have tried <th colspan={2}>{ this.props.category}</th>
?