MCPcopy
hub / github.com/vuejs/core / constructor

Method constructor

packages/reactivity/src/ref.ts:306–311  ·  view source on GitHub ↗
(factory: CustomRefFactory<T, S>)

Source from the content-addressed store, hash-verified

304 public _value: T = undefined!
305
306 constructor(factory: CustomRefFactory<T, S>) {
307 const dep = (this.dep = new Dep())
308 const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep))
309 this._get = get
310 this._set = set
311 }
312
313 get value(): T {
314 return (this._value = this._get())

Callers

nothing calls this directly

Calls 1

factoryFunction · 0.85

Tested by

no test coverage detected