Skip to content

@statesync/vue


@statesync/vue / VueRefLike

Interface: VueRefLike<State> ​

Defined in: vue.ts:20

Minimal structural interface for a Vue ref-like container.

Compatible with Ref<T>, ShallowRef<T>, or any object with a .value property of type State. We intentionally avoid importing Vue types so this adapter stays dependency-free and can be used in any environment.

Example ​

ts
import { ref } from 'vue';

interface AppState { count: number; name: string }
const myRef: VueRefLike<AppState> = ref({ count: 0, name: '' });

Type Parameters ​

Type ParameterDescription
StateThe shape of the ref's inner value.

Properties ​

value ​

ts
value: State;

Defined in: vue.ts:28

The unwrapped value held by the ref.

Assigning to this property triggers Vue's reactivity tracking so that any watchers, computed properties, or template bindings that depend on this ref are re-evaluated.

Released under the MIT License.