MCPcopy
hub / github.com/withastro/astro / createMultiChildPage

Function createMultiChildPage

packages/astro/test/units/mocks.ts:239–249  ·  view source on GitHub ↗
(
	childComponent: AstroComponentFactory,
	propsArray: Record<string, unknown>[],
)

Source from the content-addressed store, hash-verified

237 * props object in the array.
238 */
239export function createMultiChildPage(
240 childComponent: AstroComponentFactory,
241 propsArray: Record<string, unknown>[],
242): AstroComponentFactory {
243 return createComponent((result: any) => {
244 const renders = propsArray.map(
245 (props) => render`${renderComponent(result, 'Child', childComponent, props)}`,
246 );
247 return render`${renders}`;
248 });
249}
250
251interface CreateRouteDataOptions {
252 route: string;

Callers 1

Calls 3

renderComponentFunction · 0.85
createComponentFunction · 0.50
renderFunction · 0.50

Tested by

no test coverage detected