ref — typed reactive references.
1import { ref } from "vue"23// Basic types4const count = ref<number>(0)5const name = ref<string>("John")6const isActive = ref<boolean>(true)78// Complex types9interface User {10 id: number11 name: string12}1314const user = ref<User>({ id: 1, name: "John" })15const users = ref<User[]>([])1617// Nullable18const selected = ref<User | null>(null)1920// Generic21const state = ref<{ count: number; items: string[] }>({22 count: 0,23 items: []24})