Making font weight bold by passing value in React.js
Change <span id="textSpan">
to the following:
<span
id="textSpan"
style={ this.state.checkboxState ? { fontWeight: 'normal' } : { fontWeight: 'bold' } }
>
{ this.props.text }
</span>