Explain arbitrariness of ref name in callback (#8913)

* Explain arbitrariness of ref name in callback 

The sample code was confusing because it's not clear that "textInput" in this.textInput is an arbitrary name for the ref.

* Tweak wording
This commit is contained in:
Omid Hezaveh
2017-02-02 13:33:12 +00:00
committed by Dan Abramov
parent 9e3a31b2c6
commit 79be3543dd
+1 -1
View File
@@ -33,7 +33,7 @@ class CustomTextInput extends React.Component {
render() {
// Use the `ref` callback to store a reference to the text input DOM
// element in this.textInput.
// element in an instance field (for example, this.textInput).
return (
<div>
<input