Home / Function/ notify() — vue Function Reference

notify() — vue Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  98344c54_4454_3804_84b6_6f45b28782b9["notify()"]
  6468b0c5_2298_434f_d55a_c498376ea8cd["Dep"]
  98344c54_4454_3804_84b6_6f45b28782b9 -->|defined in| 6468b0c5_2298_434f_d55a_c498376ea8cd
  dea83477_00f1_3c8b_f0a1_584882807d1f["defineReactive()"]
  dea83477_00f1_3c8b_f0a1_584882807d1f -->|calls| 98344c54_4454_3804_84b6_6f45b28782b9
  3f865d9f_787c_7a50_d9a7_bb5acf03eb88["set()"]
  3f865d9f_787c_7a50_d9a7_bb5acf03eb88 -->|calls| 98344c54_4454_3804_84b6_6f45b28782b9
  ae862206_ea75_d74f_fad1_4801b0c9439c["del()"]
  ae862206_ea75_d74f_fad1_4801b0c9439c -->|calls| 98344c54_4454_3804_84b6_6f45b28782b9
  style 98344c54_4454_3804_84b6_6f45b28782b9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/core/observer/dep.ts lines 71–91

  notify(info?: DebuggerEventExtraInfo) {
    // stabilize the subscriber list first
    const subs = this.subs.filter(s => s) as DepTarget[]
    if (__DEV__ && !config.async) {
      // subs aren't sorted in scheduler if not running async
      // we need to sort them now to make sure they fire in correct
      // order
      subs.sort((a, b) => a.id - b.id)
    }
    for (let i = 0, l = subs.length; i < l; i++) {
      const sub = subs[i]
      if (__DEV__ && info) {
        sub.onTrigger &&
          sub.onTrigger({
            effect: subs[i],
            ...info
          })
      }
      sub.update()
    }
  }

Domain

Subdomains

Frequently Asked Questions

What does notify() do?
notify() is a function in the vue codebase, defined in src/core/observer/dep.ts.
Where is notify() defined?
notify() is defined in src/core/observer/dep.ts at line 71.
What calls notify()?
notify() is called by 3 function(s): defineReactive, del, set.

Analyze Your Own Codebase

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

Try Supermodel Free