react / MainThreadRef
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
>Type Parameter |
---|
T |
Parameter | Type |
---|---|
initValue |
T |
WorkletRef<T>.constructor
@lynx-js/react/runtime/lib/worklet/workletRef.d.ts:14
T
Parameter | Type |
---|---|
_ |
T |
void
WorkletRef.current
@lynx-js/react/runtime/lib/worklet/workletRef.d.ts:3