Created
August 11, 2017 15:39
-
-
Save sanketmeghani/6eb781e6da14ceb6d755f5372663917f to your computer and use it in GitHub Desktop.
React event handler with parameters using arrow function
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
handleClick(param, e) { | |
console.log('Parameter', param); | |
console.log('Event', e); | |
} | |
render() { | |
<button onClick={(e) => this.handleClick(param, e)}></button> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment