Skip to content

Instantly share code, notes, and snippets.

@akexorcist
Last active March 30, 2020 17:04
Show Gist options
  • Save akexorcist/f3f89b588ef0cf74c0c74dfb6ffa4321 to your computer and use it in GitHub Desktop.
Save akexorcist/f3f89b588ef0cf74c0c74dfb6ffa4321 to your computer and use it in GitHub Desktop.
import React, { Component } from 'react'
import ChildComponent from './ChildComponent'
...
class ParentComponent extends Component {
...
onConfirm(order) {
// Do something
}
render() {
return (
<React.Fragment>
<ChildComponent confirm={this.onConfirm} />
</React.Fragment>
)
}
}
export default ParentComponent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment