Element nodes
Element nodes represent native components in the native view tree (similar to Element nodes on Web).
They are provided by all native components, and by many built-in components, via refs:
info
Note that some built-in components are only a container for other components (including native components). For example, ScrollView internally renders a native scroll view and a native view, which are accessible through the ref it provides using methods like getNativeScrollRef() and getInnerViewRef().
Referenceโ
Web-compatible APIโ
From HTMLElement:
- Properties
- Methods
From Element:
- Properties
childElementCountchildrenclientHeightclientLeftclientTopclientWidthfirstElementChildid- โน๏ธ Returns the value of the
idornativeIDprops.
- โน๏ธ Returns the value of the
lastElementChildnextElementSiblingnodeNamenodeTypenodeValuepreviousElementSiblingscrollHeightscrollLeft- โ ๏ธ For built-in components, only
ScrollViewinstances can return a value other than zero.
- โ ๏ธ For built-in components, only
scrollTop- โ ๏ธ For built-in components, only
ScrollViewinstances can return a value other than zero.
- โ ๏ธ For built-in components, only
scrollWidthtagName- โน๏ธ Returns a normalized native component name prefixed with
RN:, likeRN:View.
- โน๏ธ Returns a normalized native component name prefixed with
textContent
- Methods
From Node:
- Properties
childNodesfirstChildisConnectedlastChildnextSiblingnodeNamenodeTypenodeValueownerDocument- โน๏ธ Will return the document node where this component was rendered.
parentElementparentNodepreviousSiblingtextContent
- Methods
compareDocumentPosition()contains()getRootNode()- โน๏ธ Will return a reference to itself if the component is not mounted.
hasChildNodes()