Guest User

Untitled

a guest
Jun 17th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //render method of my MainInterface component, which is the base component for the whole app
  2.     render() {
  3.         const arr = this.state.clickArray;
  4.         var currPlay = this.state.currentPlayer;
  5.         const fields = arr.map((item, index) =>
  6.             <GameField
  7.                 key={index}
  8.                 clicked={item}
  9.                 id={index}
  10.                 plr={this.state.currentPlayer}
  11.                 gameFinished={this.state.gameFinished}
  12.                 onMove={this.handleMove}
  13.             />
  14.         );//map
  15.  
  16.         return (
  17.             <div id="MainInterface">
  18.                 <div>{fields}</div>
  19.                 <Notifications
  20.                     messageType={this.state.messageType} />
  21.             </div>
  22.         )//return
  23.     }//render
Advertisement
Add Comment
Please, Sign In to add comment