vue-lynx

Welcome to the API reference for vue-lynx, the package that provides the Vue 3 framework for building Lynx apps. For an introduction, see the Getting Started guide.

Vue APIs

Vue Lynx uses Vue 3's @vue/runtime-core directly — the reactivity system, component model, lifecycle hooks, and Composition API are all standard Vue. You can expect these APIs to behave consistently with the official Vue 3 documentation unless otherwise noted below.

This means ref(), reactive(), computed(), watch(), onMounted(), defineComponent(), and all other Vue Composition APIs work exactly as documented on vuejs.org. The only difference is that you import them from vue-lynx instead of vue:

import { ref, computed, onMounted, defineComponent } from 'vue-lynx';

Vue Lynx APIs

The following APIs are specific to Vue Lynx's dual-thread architecture (Background Thread renderer + Main Thread native elements):

NameKind
MainThreadRefClass
createAppFunction
nextTickFunction
runOnBackgroundFunction
runOnMainThreadFunction
transformToWorkletFunction
useMainThreadRefFunction
VueLynxAppInterface

Built-in Components

ComponentStatusNotes
<Transition>ExperimentalCSS class-based enter/leave animations. Requires explicit :duration prop — getComputedStyle() is unavailable from the background thread.
<TransitionGroup>ExperimentalPer-child enter/leave animations. Move (FLIP) animations not supported — getBoundingClientRect() is unavailable from the background thread.
<Suspense>SupportedRe-exported from Vue. Works with defineAsyncComponent().
<KeepAlive>SupportedCaches inactive component instances. Supports include, exclude, and max props.
<Teleport>SupportedSupports to="#id" string selectors only. Direct element refs and non-ID selectors are not yet supported.
Warning

<Transition> and <TransitionGroup> are experimental. Always pass an explicit :duration prop — getComputedStyle() is unavailable from the background thread. Move (FLIP) animations in <TransitionGroup> are not supported.

Vue Re-exports

Standard Vue 3 APIs re-exported from vue-lynx. See Vue.js API Reference for full documentation.

NameKind
computedFunction
createPageRootFunction
customRefFunction
defineAsyncComponentFunction
defineComponentFunction
defineEmitsFunction
defineExposeFunction
defineModelFunction
defineOptionsFunction
definePropsFunction
defineSlotsFunction
effectScopeFunction
getCurrentInstanceFunction
getCurrentScopeFunction
guardReactivePropsFunction
hFunction
hasInjectionContextFunction
injectFunction
isMemoSameFunction
isProxyFunction
isReactiveFunction
isReadonlyFunction
isRefFunction
isShallowFunction
markRawFunction
mergePropsFunction
onActivatedFunction
onBeforeMountFunction
onBeforeUnmountFunction
onBeforeUpdateFunction
onDeactivatedFunction
onErrorCapturedFunction
onMountedFunction
onRenderTrackedFunction
onRenderTriggeredFunction
onScopeDisposeFunction
onUnmountedFunction
onUpdatedFunction
onWatcherCleanupFunction
provideFunction
reactiveFunction
readonlyFunction
refFunction
shallowReactiveFunction
shallowReadonlyFunction
shallowRefFunction
toRawFunction
toRefFunction
toRefsFunction
toValueFunction
TransitionFunction
triggerRefFunction
unrefFunction
useAttrsFunction
useIdFunction
useModelFunction
useSlotsFunction
useTemplateRefFunction
watchFunction
watchEffectFunction
watchPostEffectFunction
watchSyncEffectFunction
withDefaultsFunction
withModifiersFunction
AppInterface
ComponentTypeAlias
ComponentPublicInstanceTypeAlias
FragmentVariable
KeepAliveVariable
SuspenseVariable
TeleportVariable
TransitionGroupVariable
versionVariable
vModelCheckboxVariable
vModelRadioVariable
vModelSelectVariable
vModelTextVariable
withAsyncContextVariable