Home / Function/ update() — vue Function Reference

update() — vue Function Reference

Architecture documentation for the update() function in watcher.ts from the vue codebase.

Function typescript CoreRuntime Observer calls 2 called by 1

Entity Profile

Dependency Diagram

graph TD
  4f1747ac_5aeb_b4ff_a868_1c9fed4bec76["update()"]
  e7f4f452_deed_8a48_b501_c415a06a6251["Watcher"]
  4f1747ac_5aeb_b4ff_a868_1c9fed4bec76 -->|defined in| e7f4f452_deed_8a48_b501_c415a06a6251
  8c103bae_ceb4_9609_cad2_36c8a086376e["lifecycleMixin()"]
  8c103bae_ceb4_9609_cad2_36c8a086376e -->|calls| 4f1747ac_5aeb_b4ff_a868_1c9fed4bec76
  a4fba0c0_c91e_f56f_3c69_5a18514bb8e1["run()"]
  4f1747ac_5aeb_b4ff_a868_1c9fed4bec76 -->|calls| a4fba0c0_c91e_f56f_3c69_5a18514bb8e1
  331094c1_856e_230e_e56a_5500d0a6236f["queueWatcher()"]
  4f1747ac_5aeb_b4ff_a868_1c9fed4bec76 -->|calls| 331094c1_856e_230e_e56a_5500d0a6236f
  style 4f1747ac_5aeb_b4ff_a868_1c9fed4bec76 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/core/observer/watcher.ts lines 196–205

  update() {
    /* istanbul ignore else */
    if (this.lazy) {
      this.dirty = true
    } else if (this.sync) {
      this.run()
    } else {
      queueWatcher(this)
    }
  }

Domain

Subdomains

Called By

Frequently Asked Questions

What does update() do?
update() is a function in the vue codebase, defined in src/core/observer/watcher.ts.
Where is update() defined?
update() is defined in src/core/observer/watcher.ts at line 196.
What does update() call?
update() calls 2 function(s): queueWatcher, run.
What calls update()?
update() is called by 1 function(s): lifecycleMixin.

Analyze Your Own Codebase

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

Try Supermodel Free