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

node.js - How do I prevent MongoDB replica set from querying the primary? -

c# - Randomly pick a specific int from a 2D Array -

php - Angularjs http.delete is not working after deploying project on server -