Created
February 20, 2018 17:52
-
-
Save kdipaolo/64f8fae3cb828d69f79e0a4f9461385b to your computer and use it in GitHub Desktop.
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
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