Skip to content

toValue

Category
Export Size
94 B
Last Changed
4 days ago
Alias
resolveUnref
Related

Get the value of value/ref/getter.

WARNING

Deprecated, use import { toValue } from 'vue' instead.

Usage

ts
import { 
toValue
} from '@vueuse/core'
const
foo
=
ref
('hi')
const
a
=
toValue
(0) // 0
const
b
=
toValue
(
foo
) // 'hi'
const
c
=
toValue
(() => 'hi') // 'hi'

Type Declarations

ts
/**
 * Get the value of value/ref/getter.
 *
 * @deprecated use `toValue` from `vue` instead
 */
export declare const 
toValue
: typeof _toValue
/** * @deprecated use `toValue` instead */ export declare const
resolveUnref
: typeof _toValue

Source

SourceDocs

Contributors

NoiseFan

Changelog

No recent changes

Released under the MIT License.