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
  1323efd8_8b49_c7fc_a4a9_dcd8aeed5387["stop()"]
  c645c33d_8908_2339_67bb_0680e222abf8["lifecycleMixin()"]
  c645c33d_8908_2339_67bb_0680e222abf8 -->|calls| 1323efd8_8b49_c7fc_a4a9_dcd8aeed5387
  3d03878c_4a3a_4d94_b9f5_3c7287192b05["teardown()"]
  1323efd8_8b49_c7fc_a4a9_dcd8aeed5387 -->|calls| 3d03878c_4a3a_4d94_b9f5_3c7287192b05
  style 1323efd8_8b49_c7fc_a4a9_dcd8aeed5387 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