antododo / tictactoeTuto

2 stars 1 forks source link

Warning: Cannot update during an existing state transition #24

Closed antododo closed 6 years ago

antododo commented 6 years ago

The state shoudn't be updated in render()

1)render() calls this.SendWinner() who execute: this.setState({isGameStarted: false});

2)also SendWinner() calls this.ShowBalances() who execute multiple this.setState. in ShowBalances() this.setState can be change by console.log()