Skip to content

Instantly share code, notes, and snippets.

@araphiel
Created July 20, 2018 19:04
Show Gist options
  • Save araphiel/71c788c7798f21561c890ca796fa88fb to your computer and use it in GitHub Desktop.
Save araphiel/71c788c7798f21561c890ca796fa88fb to your computer and use it in GitHub Desktop.
React form handler
handleChange = event => {
this.setState({ [event.currentTarget.name]: event.currentTarget.value })
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment