mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Merge pull request #4703 from spicyj/rarr
Clarify use of arrow functions
(cherry picked from commit d4f38933f2)
This commit is contained in:
committed by
Paul O’Shannessy
parent
32663aabc6
commit
dcfbf801e4
@@ -90,7 +90,7 @@ It's as simple as:
|
||||
|
||||
The `ref` attribute can be a callback function instead of a name. This callback will be executed immediately after the component is mounted. The referenced component will be passed in as a parameter, and the callback function may use the component immediately, or save the reference for future use (or both).
|
||||
|
||||
It's as simple as assigning a `ref` attribute to anything returned from `render` such as:
|
||||
It's as simple as adding a `ref` attribute to anything returned from `render` by using an ES6 arrow function:
|
||||
|
||||
```html
|
||||
render: function() {
|
||||
|
||||
Reference in New Issue
Block a user