MCPcopy
hub / github.com/nuxt/nuxt / writableComputedRef

Function writableComputedRef

packages/nuxt/src/app/composables/asyncData.ts:574–586  ·  view source on GitHub ↗
(getter: () => Ref<T>)

Source from the content-addressed store, hash-verified

572})
573
574function writableComputedRef<T> (getter: () => Ref<T>) {
575 return computed({
576 get () {
577 return getter()?.value
578 },
579 set (value) {
580 const ref = getter()
581 if (ref) {
582 ref.value = value
583 }
584 },
585 })
586}
587
588function _isAutoKeyNeeded (keyOrFetcher: string | MaybeRefOrGetter<string> | (() => any), fetcher: () => any): boolean {
589 // string key

Callers 1

useAsyncDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…