Home / Function/ setSetupRef() — vue Function Reference

setSetupRef() — vue Function Reference

Architecture documentation for the setSetupRef() function in template-ref.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  cdcc213a_2ba1_85c3_7cad_6a7e10bf0c78["setSetupRef()"]
  b4d64c20_18f0_552d_559e_065753ef82cd["template-ref.ts"]
  cdcc213a_2ba1_85c3_7cad_6a7e10bf0c78 -->|defined in| b4d64c20_18f0_552d_559e_065753ef82cd
  ac2a5d8a_d8a3_117c_7f0d_cb9b1b084b59["registerRef()"]
  ac2a5d8a_d8a3_117c_7f0d_cb9b1b084b59 -->|calls| cdcc213a_2ba1_85c3_7cad_6a7e10bf0c78
  style cdcc213a_2ba1_85c3_7cad_6a7e10bf0c78 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/core/vdom/modules/template-ref.ts lines 82–94

function setSetupRef(
  { _setupState }: Component,
  key: string | number,
  val: any
) {
  if (_setupState && hasOwn(_setupState, key as string)) {
    if (isRef(_setupState[key])) {
      _setupState[key].value = val
    } else {
      _setupState[key] = val
    }
  }
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does setSetupRef() do?
setSetupRef() is a function in the vue codebase, defined in src/core/vdom/modules/template-ref.ts.
Where is setSetupRef() defined?
setSetupRef() is defined in src/core/vdom/modules/template-ref.ts at line 82.
What calls setSetupRef()?
setSetupRef() is called by 1 function(s): registerRef.

Analyze Your Own Codebase

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

Try Supermodel Free