Home / Function/ getData() — vue Function Reference

getData() — vue Function Reference

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

Function typescript VueCore Instance calls 2 called by 1

Entity Profile

Dependency Diagram

graph TD
  7220694c_c3d7_23d2_029a_df44a4ef7d05["getData()"]
  079339bc_f0ce_0fd0_3d1b_26a2dc073616["state.ts"]
  7220694c_c3d7_23d2_029a_df44a4ef7d05 -->|defined in| 079339bc_f0ce_0fd0_3d1b_26a2dc073616
  7fefa529_2ae1_e1d5_64aa_7ae21a5e9376["initData()"]
  7fefa529_2ae1_e1d5_64aa_7ae21a5e9376 -->|calls| 7220694c_c3d7_23d2_029a_df44a4ef7d05
  d9fae33f_7845_7289_de16_bee11c7f60e1["pushTarget()"]
  7220694c_c3d7_23d2_029a_df44a4ef7d05 -->|calls| d9fae33f_7845_7289_de16_bee11c7f60e1
  e4823f37_5db2_5310_aa9c_5b3593b02b07["popTarget()"]
  7220694c_c3d7_23d2_029a_df44a4ef7d05 -->|calls| e4823f37_5db2_5310_aa9c_5b3593b02b07
  style 7220694c_c3d7_23d2_029a_df44a4ef7d05 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/core/instance/state.ts lines 168–179

export function getData(data: Function, vm: Component): any {
  // #7573 disable dep collection when invoking data getters
  pushTarget()
  try {
    return data.call(vm, vm)
  } catch (e: any) {
    handleError(e, vm, `data()`)
    return {}
  } finally {
    popTarget()
  }
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does getData() do?
getData() is a function in the vue codebase, defined in src/core/instance/state.ts.
Where is getData() defined?
getData() is defined in src/core/instance/state.ts at line 168.
What does getData() call?
getData() calls 2 function(s): popTarget, pushTarget.
What calls getData()?
getData() is called by 1 function(s): initData.

Analyze Your Own Codebase

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

Try Supermodel Free