Home / Function/ createComputedGetter() — vue Function Reference

createComputedGetter() — vue Function Reference

Architecture documentation for the createComputedGetter() function in state.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  f80658ce_fb05_8791_c92f_3c0410b5260a["createComputedGetter()"]
  4b445b08_139d_b6b4_0861_2120f0449ae2["defineComputed()"]
  4b445b08_139d_b6b4_0861_2120f0449ae2 -->|calls| f80658ce_fb05_8791_c92f_3c0410b5260a
  86936286_63e2_eb4f_1b26_6a4b4026b810["evaluate()"]
  f80658ce_fb05_8791_c92f_3c0410b5260a -->|calls| 86936286_63e2_eb4f_1b26_6a4b4026b810
  d1eb6d83_f4fb_7e95_6bf0_bea3d8b0996f["depend()"]
  f80658ce_fb05_8791_c92f_3c0410b5260a -->|calls| d1eb6d83_f4fb_7e95_6bf0_bea3d8b0996f
  style f80658ce_fb05_8791_c92f_3c0410b5260a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/core/instance/state.ts lines 256–277

function createComputedGetter(key) {
  return function computedGetter() {
    const watcher = this._computedWatchers && this._computedWatchers[key]
    if (watcher) {
      if (watcher.dirty) {
        watcher.evaluate()
      }
      if (Dep.target) {
        if (__DEV__ && Dep.target.onTrack) {
          Dep.target.onTrack({
            effect: Dep.target,
            target: this,
            type: TrackOpTypes.GET,
            key
          })
        }
        watcher.depend()
      }
      return watcher.value
    }
  }
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does createComputedGetter() do?
createComputedGetter() is a function in the vue codebase.
What does createComputedGetter() call?
createComputedGetter() calls 2 function(s): depend, evaluate.
What calls createComputedGetter()?
createComputedGetter() is called by 1 function(s): defineComputed.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free