Skip to content

Instantly share code, notes, and snippets.

@thiskevinwang
Created February 6, 2019 23:22
Show Gist options
  • Select an option

  • Save thiskevinwang/45d935331a977ae845b8bf1f712dd60b to your computer and use it in GitHub Desktop.

Select an option

Save thiskevinwang/45d935331a977ae845b8bf1f712dd60b to your computer and use it in GitHub Desktop.
Board Component
class Board extends React.Component {
renderSquare(i) {
return (
<Square
isWinning={this.props.winningSquares.includes(i)}
key={"square " + i}
value={this.props.squares[i]}
onClick={() => this.props.onClick(i)}
/>
);
}
//... etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment