Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 339 Bytes

index.md

File metadata and controls

20 lines (14 loc) · 339 Bytes
category related
Utilities
resolveUnref

resolveRef

Normalize value/ref/getter to ref or computed.

Usage

import { resolveRef } from '@vueuse/core'

const foo = ref('hi')

const a = resolveRef(0) // Ref<number>
const b = resolveRef(foo) // Ref<string>
const c = resolveRef(() => 'hi') // ComputedRef<string>