Skip to main content

元素节点

元素节点代表原生视图树中的原生组件(类似于 Web 上的 元素 节点)。

¥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:

信息

请注意,某些内置组件只是其他组件(包括原生组件)的容器。例如,ScrollView 在内部渲染一个原生滚动视图和一个原生视图,可以通过其提供的 ref 使用 getNativeScrollRef()getInnerViewRef() 等方法访问它们。

¥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 兼容 API

¥Web-compatible API

来自 HTMLElement

¥From HTMLElement:

来自 Element

¥From Element:

来自 Node

¥From Node:

旧版 API

¥Legacy API