@lynx-js/react / MainThreadRef
类: MainThreadRef<T>
A MainThreadRef is a ref that can only be accessed on the main thread. It is used to preserve
states between main thread function calls.
The data saved in current property of the MainThreadRef can be read and written in
multiple main thread functions.
继承
WorkletRef<T>
类型参数
构造函数
new MainThreadRef()
参数
返回
重写了
WorkletRef<T>.constructor
定义于
@lynx-js/react/runtime/lib/snapshot/worklet/ref/workletRef.d.ts:15
访问器
current
Getter 签名
返回
T
Setter 签名
参数
返回
void
继承自
WorkletRef.current
定义于
@lynx-js/react/runtime/lib/snapshot/worklet/ref/workletRef.d.ts:4