Answer the question
In order to leave comments, you need to log in
How to replace a specific entry in MongoDB?
Hello,
I am generating a map based on a table.
When the user clicks on a cell, a symbol appears in it.
if (value === null) return (
<td onClick={this.handleCellClick.bind(this, row, col)}></td>
);
handleCellClick(row, col) {
let currentPlayer = this.currentPlayer(); // 1
let game = this.props.game;
game.board[row][col] = currentPlayer;
Games.update(game._id, { $set: {board: game.board} });
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question