Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Apply VueUse composables in Vue 3/Nuxt projects to replace custom implementations with battle-tested utilities.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/useToString.md
1---2category: Utilities3---45# useToString67Reactively convert a ref to string.89## Usage1011```ts12import { useToString } from '@vueuse/core'13import { shallowRef } from 'vue'1415const number = shallowRef(3.14)16const str = useToString(number)1718str.value // '3.14'19```2021## Type Declarations2223```ts24/**25* Reactively convert a ref to string.26*27* @see https://vueuse.org/useToString28*29* @__NO_SIDE_EFFECTS__30*/31export declare function useToString(32value: MaybeRefOrGetter<unknown>,33): ComputedRef<string>34```35