renderSlots() — astro Function Reference
Architecture documentation for the renderSlots() function in slot.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 96ef6c84_348c_217f_a781_262e9b1b107c["renderSlots()"] c9adf848_436e_587f_c997_d91471df3357["slot.ts"] 96ef6c84_348c_217f_a781_262e9b1b107c -->|defined in| c9adf848_436e_587f_c997_d91471df3357 c7a8186f_aeaf_a5d7_bd00_b110613a15c0["renderSlotToString()"] 96ef6c84_348c_217f_a781_262e9b1b107c -->|calls| c7a8186f_aeaf_a5d7_bd00_b110613a15c0 style 96ef6c84_348c_217f_a781_262e9b1b107c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/runtime/server/render/slot.ts lines 94–116
export async function renderSlots(
result: SSRResult,
slots: ComponentSlots = {},
): Promise<RenderSlotsResult> {
let slotInstructions: RenderSlotsResult['slotInstructions'] = null;
let children: RenderSlotsResult['children'] = {};
if (slots) {
await Promise.all(
Object.entries(slots).map(([key, value]) =>
renderSlotToString(result, value).then((output: any) => {
if (output.instructions) {
if (slotInstructions === null) {
slotInstructions = [];
}
slotInstructions.push(...output.instructions);
}
children[key] = output;
}),
),
);
}
return { slotInstructions, children };
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does renderSlots() do?
renderSlots() is a function in the astro codebase, defined in packages/astro/src/runtime/server/render/slot.ts.
Where is renderSlots() defined?
renderSlots() is defined in packages/astro/src/runtime/server/render/slot.ts at line 94.
What does renderSlots() call?
renderSlots() calls 1 function(s): renderSlotToString.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free