Home / Function/ stop() — vue Function Reference

stop() — vue Function Reference

Architecture documentation for the stop() function in effectScope.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  4a222c5c_d85c_6c90_508b_adee198fde38["stop()"]
  1edb3174_323d_290c_a67e_82eeac5c460f["lifecycleMixin()"]
  1edb3174_323d_290c_a67e_82eeac5c460f -->|calls| 4a222c5c_d85c_6c90_508b_adee198fde38
  548462f9_f5ae_6335_80f2_a5f5b9fdf922["teardown()"]
  4a222c5c_d85c_6c90_508b_adee198fde38 -->|calls| 548462f9_f5ae_6335_80f2_a5f5b9fdf922
  style 4a222c5c_d85c_6c90_508b_adee198fde38 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/v3/reactivity/effectScope.ts lines 79–105

  stop(fromParent?: boolean) {
    if (this.active) {
      let i, l
      for (i = 0, l = this.effects.length; i < l; i++) {
        this.effects[i].teardown()
      }
      for (i = 0, l = this.cleanups.length; i < l; i++) {
        this.cleanups[i]()
      }
      if (this.scopes) {
        for (i = 0, l = this.scopes.length; i < l; i++) {
          this.scopes[i].stop(true)
        }
      }
      // nested scope, dereference from parent to avoid memory leaks
      if (!this.detached && this.parent && !fromParent) {
        // optimized O(1) removal
        const last = this.parent.scopes!.pop()
        if (last && last !== this) {
          this.parent.scopes![this.index!] = last
          last.index = this.index!
        }
      }
      this.parent = undefined
      this.active = false
    }
  }

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does stop() do?
stop() is a function in the vue codebase.
What does stop() call?
stop() calls 1 function(s): teardown.
What calls stop()?
stop() 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