Skip to content

Instantly share code, notes, and snippets.

@kdipaolo
Created February 20, 2018 17:52
Show Gist options
  • Save kdipaolo/64f8fae3cb828d69f79e0a4f9461385b to your computer and use it in GitHub Desktop.
Save kdipaolo/64f8fae3cb828d69f79e0a4f9461385b to your computer and use it in GitHub Desktop.
class ForceSignIn extends React.Component {
handleClick = e => {
this.forceSignIn()
}
render() {
return (
<div onClick={this.handleClick}>
{this.props.children}
</div>
)
}
}
<ForceSignIn>
// I want to be able to stop this click from happening in this components
// and only allow parent component to fire when clicking inside of forceSignIn
<ListItem onClick={this.handeClick} />
</ForceSignIn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment