Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //render method of my MainInterface component, which is the base component for the whole app
- render() {
- const arr = this.state.clickArray;
- var currPlay = this.state.currentPlayer;
- const fields = arr.map((item, index) =>
- <GameField
- key={index}
- clicked={item}
- id={index}
- plr={this.state.currentPlayer}
- gameFinished={this.state.gameFinished}
- onMove={this.handleMove}
- />
- );//map
- return (
- <div id="MainInterface">
- <div>{fields}</div>
- <Notifications
- messageType={this.state.messageType} />
- </div>
- )//return
- }//render
Advertisement
Add Comment
Please, Sign In to add comment