Skip to content

Instantly share code, notes, and snippets.

@skiabox
Last active Sep 23, 2020
Embed
What would you like to do?
handleClick = () => {
this.setState((prevState, prevProps) => {
return {meaningOfLife: prevState.meaningOfLife + 1},
() => console.log(this.state.meaningOfLife)
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment