mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
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:
committed by
Dan Abramov
parent
9e3a31b2c6
commit
79be3543dd
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user