Home / Function/ getContext() — vue Function Reference

getContext() — vue Function Reference

Architecture documentation for the getContext() function in apiSetup.ts from the vue codebase.

Function typescript VueCore GlobalAPI calls 1 called by 3

Entity Profile

Dependency Diagram

graph TD
  7a1a0582_7ae8_b4eb_cb92_afa5e34b7d59["getContext()"]
  3a7c7919_1905_22a7_f604_9084d5e5d0df["apiSetup.ts"]
  7a1a0582_7ae8_b4eb_cb92_afa5e34b7d59 -->|defined in| 3a7c7919_1905_22a7_f604_9084d5e5d0df
  8ffc5b02_f328_0785_5d67_721512efd6ea["useSlots()"]
  8ffc5b02_f328_0785_5d67_721512efd6ea -->|calls| 7a1a0582_7ae8_b4eb_cb92_afa5e34b7d59
  8463d003_17fb_9843_b004_ed8da9a96781["useAttrs()"]
  8463d003_17fb_9843_b004_ed8da9a96781 -->|calls| 7a1a0582_7ae8_b4eb_cb92_afa5e34b7d59
  c0181f42_9896_8583_fb05_3f413ebc241d["useListeners()"]
  c0181f42_9896_8583_fb05_3f413ebc241d -->|calls| 7a1a0582_7ae8_b4eb_cb92_afa5e34b7d59
  77439d3b_3112_cab2_abe3_0aaab4a3b61f["createSetupContext()"]
  7a1a0582_7ae8_b4eb_cb92_afa5e34b7d59 -->|calls| 77439d3b_3112_cab2_abe3_0aaab4a3b61f
  style 7a1a0582_7ae8_b4eb_cb92_afa5e34b7d59 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/v3/apiSetup.ts lines 208–214

function getContext(): SetupContext {
  if (__DEV__ && !currentInstance) {
    warn(`useContext() called without active instance.`)
  }
  const vm = currentInstance!
  return vm._setupContext || (vm._setupContext = createSetupContext(vm))
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does getContext() do?
getContext() is a function in the vue codebase, defined in src/v3/apiSetup.ts.
Where is getContext() defined?
getContext() is defined in src/v3/apiSetup.ts at line 208.
What does getContext() call?
getContext() calls 1 function(s): createSetupContext.
What calls getContext()?
getContext() is called by 3 function(s): useAttrs, useListeners, useSlots.

Analyze Your Own Codebase

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

Try Supermodel Free