Skip to content

Instantly share code, notes, and snippets.

@karltaylor
Last active August 2, 2018 15:33
Show Gist options
  • Save karltaylor/b0b5dac892321299fd715d15a318bef3 to your computer and use it in GitHub Desktop.
Save karltaylor/b0b5dac892321299fd715d15a318bef3 to your computer and use it in GitHub Desktop.
Handle Input Change React
handleChange = e => {
const {name, value} = e.currentTarget
this.setState({
[name]: value
})
}
// Make sure you've set a 'name' attribute on the input.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment