MCPcopy
hub / github.com/vuejs/composition-api / customRef

Function customRef

src/reactivity/ref.ts:143–153  ·  view source on GitHub ↗
(factory: CustomRefFactory<T>)

Source from the content-addressed store, hash-verified

141}
142
143export function customRef<T>(factory: CustomRefFactory<T>): Ref<T> {
144 const version = ref(0)
145 return createRef(
146 factory(
147 () => void version.value,
148 () => {
149 ++version.value
150 }
151 )
152 )
153}
154
155export function toRef<T extends object, K extends keyof T>(
156 object: T,

Callers 1

ref.spec.tsFile · 0.90

Calls 2

refFunction · 0.85
createRefFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…