Skip to content

Instantly share code, notes, and snippets.

@bmind12
Last active April 1, 2018 11:23
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 bmind12/8ad1cc373648e5085b0054128951be58 to your computer and use it in GitHub Desktop.
Save bmind12/8ad1cc373648e5085b0054128951be58 to your computer and use it in GitHub Desktop.
React refs - new way of naming
render() {
return (
<div ref={this.setContainerRef}>
Hello world!
</div>
)
}
setContainerRef = ref => {
this.container = ref;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment