Last active
April 1, 2018 11:23
-
-
Save bmind12/8ad1cc373648e5085b0054128951be58 to your computer and use it in GitHub Desktop.
React refs - new way of naming
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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