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
  712bda8a_c56d_9028_e161_65e495fb47d1["stop()"]
  88c159e0_a17b_965d_b204_b7c3c59c6054["EffectScope"]
  712bda8a_c56d_9028_e161_65e495fb47d1 -->|defined in| 88c159e0_a17b_965d_b204_b7c3c59c6054
  style 712bda8a_c56d_9028_e161_65e495fb47d1 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

Frequently Asked Questions

What does stop() do?
stop() is a function in the vue codebase, defined in src/v3/reactivity/effectScope.ts.
Where is stop() defined?
stop() is defined in src/v3/reactivity/effectScope.ts at line 79.

Analyze Your Own Codebase

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

Try Supermodel Free