Created
February 24, 2018 23:53
-
-
Save janephilipps/1fb94ad65b328135047346c0f8895070 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
render() { | |
let rows = this.state.board.map((rowContent, id) => ( | |
<Row | |
id={id} | |
rowContent={rowContent} | |
onClick={this._handleClick.bind(this)} | |
/> | |
)); | |
let message = this._getMessage(this.state); | |
return ( | |
<div> | |
<button | |
onClick={this._resetBoard.bind(this)} | |
className=”reset” | |
> | |
RESET | |
</button> | |
<div className=”message”> | |
{message} | |
</div> | |
<div className=”board”> | |
{rows} | |
</div> | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment