Skip to content

Instantly share code, notes, and snippets.

@caged
Last active July 19, 2018 19:26
Show Gist options
  • Save caged/fed523040b43046b27a52290d26c4ceb to your computer and use it in GitHub Desktop.
Save caged/fed523040b43046b27a52290d26c4ceb to your computer and use it in GitHub Desktop.
class A extends Component {
handleSomeEvent = (value: string) => {
/* do stuff */
}
render() {
return <B onSubmit={this.handleSomeEvent} />
}
}
type Props = {
onSubmit: Function
}
class B extends Component<Props> {
handleSomeFormSubmitEvent: (event: Event) {
this.props.onSubmit('some value')
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment