Skip to content

Instantly share code, notes, and snippets.

@Joe1220
Created August 7, 2018 03:49
Show Gist options
  • Select an option

  • Save Joe1220/7adca9b1754ebfc22b929e66fe1dc11b to your computer and use it in GitHub Desktop.

Select an option

Save Joe1220/7adca9b1754ebfc22b929e66fe1dc11b to your computer and use it in GitHub Desktop.
// Correct
this.setState((prevState, props) => ({
counter: prevState.counter + props.increment
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment