Last active
March 5, 2019 00:00
-
-
Save PabloRegen/59e455459abc2c078c23877726843789 to your computer and use it in GitHub Desktop.
Clear board and new board methods
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 App extends Component { | |
state = {...}; | |
runStopButton = () => {...} | |
handleClearBoard = () => { | |
this.setState({ | |
boardStatus: newBoardStatus(() => false), | |
generation: 0 | |
}); | |
} | |
handleNewBoard = () => { | |
this.setState({ | |
boardStatus: newBoardStatus(), | |
generation: 0 | |
}); | |
} | |
// More methods ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment