Skip to content

Instantly share code, notes, and snippets.

@manoelneto
Created August 7, 2018 21:47
Show Gist options
  • Save manoelneto/3518d3b01a52d1574519c2e96d2f23c0 to your computer and use it in GitHub Desktop.
Save manoelneto/3518d3b01a52d1574519c2e96d2f23c0 to your computer and use it in GitHub Desktop.
class MyOtherComponent extends Component {
// router e anotherFunc estará disponível dentro de this.props.
componentDidMount() {
this.props.anotherFunc();
}
}
export default withRouter(MyOtherComponent);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment