Skip to content

Instantly share code, notes, and snippets.

@janephilipps
Created February 24, 2018 23:53
Show Gist options
  • Save janephilipps/1fb94ad65b328135047346c0f8895070 to your computer and use it in GitHub Desktop.
Save janephilipps/1fb94ad65b328135047346c0f8895070 to your computer and use it in GitHub Desktop.
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