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
  a736e9c3_51fa_4ff8_f139_f83b45794e0f["notify()"]
  558ee358_0776_b0dd_fc5b_6c8f87e1a04e["defineReactive()"]
  558ee358_0776_b0dd_fc5b_6c8f87e1a04e -->|calls| a736e9c3_51fa_4ff8_f139_f83b45794e0f
  f3ed2d67_a40e_608d_185e_32b185fb8046["set()"]
  f3ed2d67_a40e_608d_185e_32b185fb8046 -->|calls| a736e9c3_51fa_4ff8_f139_f83b45794e0f
  65d6c0bc_8e31_6ec0_0f11_1e01142bff2d["del()"]
  65d6c0bc_8e31_6ec0_0f11_1e01142bff2d -->|calls| a736e9c3_51fa_4ff8_f139_f83b45794e0f
  61e1f9ae_c4e6_52e8_44cc_d26a2aaf8c1a["triggerRef()"]
  61e1f9ae_c4e6_52e8_44cc_d26a2aaf8c1a -->|calls| a736e9c3_51fa_4ff8_f139_f83b45794e0f
  61d0e216_bbe6_fde1_d695_6f4a6a923f3b["customRef()"]
  61d0e216_bbe6_fde1_d695_6f4a6a923f3b -->|calls| a736e9c3_51fa_4ff8_f139_f83b45794e0f
  style a736e9c3_51fa_4ff8_f139_f83b45794e0f 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.
What calls notify()?
notify() is called by 5 function(s): customRef, defineReactive, del, set, triggerRef.

Analyze Your Own Codebase

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

Try Supermodel Free