renderSlot() — astro Function Reference
Architecture documentation for the renderSlot() function in slot.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 0af113ef_9488_b2d7_aea4_a88f43fa1bc8["renderSlot()"] c9adf848_436e_587f_c997_d91471df3357["slot.ts"] 0af113ef_9488_b2d7_aea4_a88f43fa1bc8 -->|defined in| c9adf848_436e_587f_c997_d91471df3357 c7a8186f_aeaf_a5d7_bd00_b110613a15c0["renderSlotToString()"] c7a8186f_aeaf_a5d7_bd00_b110613a15c0 -->|calls| 0af113ef_9488_b2d7_aea4_a88f43fa1bc8 style 0af113ef_9488_b2d7_aea4_a88f43fa1bc8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/runtime/server/render/slot.ts lines 45–58
export function renderSlot(
result: SSRResult,
slotted: ComponentSlotValue | RenderTemplateResult,
fallback?: ComponentSlotValue | RenderTemplateResult,
): RenderInstance {
if (!slotted && fallback) {
return renderSlot(result, fallback);
}
return {
async render(destination) {
await renderChild(destination, typeof slotted === 'function' ? slotted(result) : slotted);
},
};
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does renderSlot() do?
renderSlot() is a function in the astro codebase, defined in packages/astro/src/runtime/server/render/slot.ts.
Where is renderSlot() defined?
renderSlot() is defined in packages/astro/src/runtime/server/render/slot.ts at line 45.
What calls renderSlot()?
renderSlot() is called by 1 function(s): renderSlotToString.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free