Home / Function/ depend() — vue Function Reference

depend() — vue Function Reference

Architecture documentation for the depend() function in dep.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  3e3c4a43_0494_5d27_e47e_6cc391330201["depend()"]
  345b25ad_bb77_07cb_ecf5_8b82f12ddccd["defineReactive()"]
  345b25ad_bb77_07cb_ecf5_8b82f12ddccd -->|calls| 3e3c4a43_0494_5d27_e47e_6cc391330201
  beeed3cb_821a_59c9_646a_5317e05efde7["dependArray()"]
  beeed3cb_821a_59c9_646a_5317e05efde7 -->|calls| 3e3c4a43_0494_5d27_e47e_6cc391330201
  d1eb6d83_f4fb_7e95_6bf0_bea3d8b0996f["depend()"]
  d1eb6d83_f4fb_7e95_6bf0_bea3d8b0996f -->|calls| 3e3c4a43_0494_5d27_e47e_6cc391330201
  0dff7671_dbca_28ee_2e55_169d9e03ef4c["proxyWithRefUnwrap()"]
  0dff7671_dbca_28ee_2e55_169d9e03ef4c -->|calls| 3e3c4a43_0494_5d27_e47e_6cc391330201
  ed9e592d_d374_e542_fb6c_6a607c8ec505["customRef()"]
  ed9e592d_d374_e542_fb6c_6a607c8ec505 -->|calls| 3e3c4a43_0494_5d27_e47e_6cc391330201
  style 3e3c4a43_0494_5d27_e47e_6cc391330201 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/core/observer/dep.ts lines 59–69

  depend(info?: DebuggerEventExtraInfo) {
    if (Dep.target) {
      Dep.target.addDep(this)
      if (__DEV__ && info && Dep.target.onTrack) {
        Dep.target.onTrack({
          effect: Dep.target,
          ...info
        })
      }
    }
  }

Domain

Subdomains

Frequently Asked Questions

What does depend() do?
depend() is a function in the vue codebase.
What calls depend()?
depend() is called by 5 function(s): customRef, defineReactive, depend, dependArray, proxyWithRefUnwrap.

Analyze Your Own Codebase

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

Try Supermodel Free