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

Function reactiveGetter

packages/reactivity/src/watch.ts:136–144  ·  view source on GitHub ↗
(source: object)

Source from the content-addressed store, hash-verified

134 }
135
136 const reactiveGetter = (source: object) => {
137 // traverse will happen in wrapped getter below
138 if (deep) return source
139 // for `deep: false | 0` or shallow reactive, only traverse root-level properties
140 if (isShallow(source) || deep === false || deep === 0)
141 return traverse(source, 1)
142 // for `deep: undefined` on a reactive object, deeply traverse all properties
143 return traverse(source)
144 }
145
146 let effect: ReactiveEffect
147 let getter: () => any

Callers 1

watchFunction · 0.85

Calls 2

isShallowFunction · 0.90
traverseFunction · 0.85

Tested by

no test coverage detected