Home / Function/ getContext() — astro Function Reference

getContext() — astro Function Reference

Architecture documentation for the getContext() function in context.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  37d89ec9_c7b2_fb3e_cfab_edeb1820a009["getContext()"]
  0a91a3f7_b830_8926_2e34_122c4ecfcfad["context.ts"]
  37d89ec9_c7b2_fb3e_cfab_edeb1820a009 -->|defined in| 0a91a3f7_b830_8926_2e34_122c4ecfcfad
  347a8da8_d691_353f_1348_fc3a717969be["incrementId()"]
  347a8da8_d691_353f_1348_fc3a717969be -->|calls| 37d89ec9_c7b2_fb3e_cfab_edeb1820a009
  style 37d89ec9_c7b2_fb3e_cfab_edeb1820a009 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/integrations/vue/src/context.ts lines 7–19

function getContext(rendererContextResult: SSRResult) {
	if (contexts.has(rendererContextResult)) {
		return contexts.get(rendererContextResult);
	}
	const ctx = {
		currentIndex: 0,
		get id() {
			return ID_PREFIX + this.currentIndex.toString();
		},
	};
	contexts.set(rendererContextResult, ctx);
	return ctx;
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does getContext() do?
getContext() is a function in the astro codebase, defined in packages/integrations/vue/src/context.ts.
Where is getContext() defined?
getContext() is defined in packages/integrations/vue/src/context.ts at line 7.
What calls getContext()?
getContext() is called by 1 function(s): incrementId.

Analyze Your Own Codebase

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

Try Supermodel Free