Skip to content

Instantly share code, notes, and snippets.

@singingwolfboy
Last active March 6, 2018 12:57
Show Gist options
  • Save singingwolfboy/645d18991cf788d8c024093abf8effe5 to your computer and use it in GitHub Desktop.
Save singingwolfboy/645d18991cf788d8c024093abf8effe5 to your computer and use it in GitHub Desktop.
<input onClick={function() {}} />
class Component extends React.Component {
propTypes = {
onClick: PropTypes.func,
}
handleClick = e => {
// do stuff
this.props.onClick()
}
openModal = e => {
this.setState({ open: true }}
}
render() {
<input onClick={this.handleClick} />
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment