Skip to content

Instantly share code, notes, and snippets.

@jmsevold
Created June 17, 2016 17:44
Show Gist options
  • Save jmsevold/95d53c471ef957054d8b4e09e06963d8 to your computer and use it in GitHub Desktop.
Save jmsevold/95d53c471ef957054d8b4e09e06963d8 to your computer and use it in GitHub Desktop.
class ContainerComponent extends React.Component{
// excluding everything else
handleButtonClick(){
// stuff
}
render(){
<PresentationalComponent onButtonClick={this.handleButtonCLick.bind(this)}
}
}
const PresentationalComponent = (props) => {
// excluding everything else
<button type="button" onClick={props.onButtonClick}>Click me</button>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment