Created
February 6, 2019 23:22
-
-
Save thiskevinwang/45d935331a977ae845b8bf1f712dd60b to your computer and use it in GitHub Desktop.
Board Component
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
| 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