Directly set the attributes of the selected node.
When you have to refresh frequently and encounter performance bottlenecks.
Directly operating components is not a tool that should be used often.
Generally, it is only used to create continuous animations, while avoiding the large overhead brought about by rendering component structures and synchronizing too many view changes.
setNativeProps
is a "simple and crude" method, it directly records the state at element instead of in the Lynx component, which makes the code logic difficult to understand.
So before using this method, please try to solve the problem with useState
method first.
A Record<string, any>
, describes the properties that need to be set. Properties can be any attribute of the UI node, including CSS properties and attributes
.
Note that style
cannot be set as a whole (the key of nativeProps
cannot be style
).
Contains the SelectorQuery
object for this task. Call exec()
to execute the task.
upper-threshold
attribute of <scroll-view />
.<view />
.LCD tables only load in the browser