vue-lynx / MainThreadRef
Class: MainThreadRef<T>
Type Parameters
Constructors
new MainThreadRef()
Parameters
Returns
Defined in
packages/vue-lynx/runtime/src/main-thread-ref.ts:41
Properties
Accessors
value
Get Signature
.value — reactive read-only on the Background Thread.
Reading triggers Vue dependency tracking (shallowRef).
Writing is blocked — no BG→MT sync channel exists yet.
Returns
T
Set Signature
Parameters
Returns
void
Defined in
packages/vue-lynx/runtime/src/main-thread-ref.ts:56
current
Get Signature
.current — worklet convention alias, read-only on BG.
On the Main Thread, worklet-runtime replaces this object entirely,
so .current is read-write there. On BG it exists only for SWC
worklet transform compatibility.
Returns
T
Set Signature
Parameters
Returns
void
Defined in
packages/vue-lynx/runtime/src/main-thread-ref.ts:75
_initValue
Get Signature
The initial value passed to useMainThreadRef().
Returns
T
Defined in
packages/vue-lynx/runtime/src/main-thread-ref.ts:89
Methods
toJSON()
Serialize for cross-thread transfer (ops buffer JSON).
Returns
object
_wvid
_initValue
Defined in
packages/vue-lynx/runtime/src/main-thread-ref.ts:94