Home / Function/ proxy() — vue Function Reference

proxy() — vue Function Reference

Architecture documentation for the proxy() function in state.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  fad58ec8_df0b_6b38_de80_539f1b7ee0f3["proxy()"]
  079339bc_f0ce_0fd0_3d1b_26a2dc073616["state.ts"]
  fad58ec8_df0b_6b38_de80_539f1b7ee0f3 -->|defined in| 079339bc_f0ce_0fd0_3d1b_26a2dc073616
  633e435b_6794_5170_c66c_026a552fcc59["initProps()"]
  633e435b_6794_5170_c66c_026a552fcc59 -->|calls| fad58ec8_df0b_6b38_de80_539f1b7ee0f3
  11be9efe_fcdb_2fab_aef6_4fe2f72d828f["initProps()"]
  11be9efe_fcdb_2fab_aef6_4fe2f72d828f -->|calls| fad58ec8_df0b_6b38_de80_539f1b7ee0f3
  7fefa529_2ae1_e1d5_64aa_7ae21a5e9376["initData()"]
  7fefa529_2ae1_e1d5_64aa_7ae21a5e9376 -->|calls| fad58ec8_df0b_6b38_de80_539f1b7ee0f3
  style fad58ec8_df0b_6b38_de80_539f1b7ee0f3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/core/instance/state.ts lines 42–50

export function proxy(target: Object, sourceKey: string, key: string) {
  sharedPropertyDefinition.get = function proxyGetter() {
    return this[sourceKey][key]
  }
  sharedPropertyDefinition.set = function proxySetter(val) {
    this[sourceKey][key] = val
  }
  Object.defineProperty(target, key, sharedPropertyDefinition)
}

Domain

Subdomains

Frequently Asked Questions

What does proxy() do?
proxy() is a function in the vue codebase, defined in src/core/instance/state.ts.
Where is proxy() defined?
proxy() is defined in src/core/instance/state.ts at line 42.
What calls proxy()?
proxy() is called by 3 function(s): initData, initProps, initProps.

Analyze Your Own Codebase

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

Try Supermodel Free