Last active
August 11, 2017 14:57
-
-
Save sanketmeghani/24bd2ad5a2255f562cf81aec2c904810 to your computer and use it in GitHub Desktop.
React event handler with parameters
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={this.handleClick.bind(this, 'Parameter')}></button> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment