You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a feature that has been requested before. It's basically to allow using ref inside regular dom elements, instead of only for component instances. If a ref is given to an element, its reference should be stored in the refs variable of the owner component. For example:
// Can be accessed as "this.refs.myElement"<divref="myElement"></div>
Note that component instances should still be accessible inside this.components like before (for backwards compatibility), but not element instances (since they're not components). Both should be accessible via this.refs. In a future major version we can get rid of this.components (since it covers only one of the use cases due to the name being too specific).
The text was updated successfully, but these errors were encountered:
This is a feature that has been requested before. It's basically to allow using
ref
inside regular dom elements, instead of only for component instances. If aref
is given to an element, its reference should be stored in therefs
variable of the owner component. For example:Note that component instances should still be accessible inside
this.components
like before (for backwards compatibility), but not element instances (since they're not components). Both should be accessible viathis.refs
. In a future major version we can get rid ofthis.components
(since it covers only one of the use cases due to the name being too specific).The text was updated successfully, but these errors were encountered: