Skip to content

Instantly share code, notes, and snippets.

@larafale
Created September 24, 2019 20:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save larafale/a09cee5d52995d1913a3e9e8c5dcff50 to your computer and use it in GitHub Desktop.
Save larafale/a09cee5d52995d1913a3e9e8c5dcff50 to your computer and use it in GitHub Desktop.
react hook reference
componentDidMount() {
this.props.onRef&&this.props.onRef(this)
}
componentWillUnmount() {
this.props.onRef&&this.props.onRef(undefined)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment