texi rv texi rv - 1 year ago 31
CSS Question

If you click on any square, an X should show up in it



providing code below

render() {
return (
<button className="square" onClick={() => this.setState({value: 'X'})}>
{this.state.value}
</button>
);
}

Answer Source

Your CodePen appears to use onclick instead of onClick. React requires onClick.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download