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


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

python 3.x - PyQt5 - Signal : pyqtSignal no method connect -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)