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/reactiveComputed.md
1---2category: Reactivity3---45# reactiveComputed67Computed reactive object. Instead of returning a ref that `computed` does, `reactiveComputed` returns a reactive object.89## Usage1011```ts12import { reactiveComputed } from '@vueuse/core'1314const state = reactiveComputed(() => {15return {16foo: 'bar',17bar: 'baz',18}19})2021state.bar // 'baz'22```2324## Type Declarations2526```ts27export type ReactiveComputedReturn<T extends object> = UnwrapNestedRefs<T>28/**29* Computed reactive object.30*/31export declare function reactiveComputed<T extends object>(32fn: ComputedGetter<T>,33): ReactiveComputedReturn<T>34```35