Clarify that string refs are considered legacy. (#6692)

(cherry picked from commit d7ced68dce)
This commit is contained in:
Andrew Clark
2016-05-31 12:15:47 -07:00
committed by Paul O’Shannessy
parent 22b96dd414
commit e6ad21933b
+5 -1
View File
@@ -68,7 +68,11 @@ Note that when the referenced component is unmounted and whenever the ref change
## The ref String Attribute
React also supports using a string (instead of a callback) as a ref prop on any component, although this approach is mostly legacy at this point.
> Note:
>
> Although string refs are not deprecated, they are considered legacy, and will likely be deprecated at some point in the future. Callback refs are preferred.
React also supports using a string (instead of a callback) as a ref prop on any component.
1. Assign a `ref` attribute to anything returned from `render` such as: