init() — astro Function Reference
Architecture documentation for the init() function in instance.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 2bbe8ffe_7c37_0788_f75d_af62023ae9c3["init()"] c8404018_ae72_dbaf_c01d_66b8b2cbc344["AstroComponentInstance"] 2bbe8ffe_7c37_0788_f75d_af62023ae9c3 -->|defined in| c8404018_ae72_dbaf_c01d_66b8b2cbc344 d5585077_c610_30d8_780d_3b719e68ba58["render()"] d5585077_c610_30d8_780d_3b719e68ba58 -->|calls| 2bbe8ffe_7c37_0788_f75d_af62023ae9c3 style 2bbe8ffe_7c37_0788_f75d_af62023ae9c3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/runtime/server/render/astro/instance.ts lines 48–66
init(result: SSRResult): AstroFactoryReturnValue | Promise<AstroFactoryReturnValue> {
if (this.returnValue !== undefined) {
return this.returnValue;
}
this.returnValue = this.factory(result, this.props, this.slotValues);
// Save the resolved value after promise is resolved for optimization
if (isPromise(this.returnValue)) {
this.returnValue
.then((resolved) => {
this.returnValue = resolved;
})
.catch(() => {
// Ignore errors and appease unhandledrejection error
});
}
return this.returnValue;
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does init() do?
init() is a function in the astro codebase, defined in packages/astro/src/runtime/server/render/astro/instance.ts.
Where is init() defined?
init() is defined in packages/astro/src/runtime/server/render/astro/instance.ts at line 48.
What calls init()?
init() is called by 1 function(s): render.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free