Created
January 19, 2017 17:48
-
-
Save KarafiziArtur/461a173dc0153046bb05bcca11503154 to your computer and use it in GitHub Desktop.
React universal onChange handler for inputs
This file contains 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
onChangeHandler = (event) => { | |
this.setState({ | |
[event.target.name]: event.target.value | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment