MCPcopy
hub / github.com/sveltejs/svelte / component

Method component

packages/svelte/src/internal/server/renderer.js:317–322  ·  view source on GitHub ↗

* Create a component renderer. The component renderer inherits the state from the parent, * but has its own content. It is treated as an ordering boundary for ondestroy callbacks. * @param {(renderer: Renderer) => MaybePromise<void>} fn * @param {Function} [component_fn] * @returns {void}

(fn, component_fn)

Source from the content-addressed store, hash-verified

315 * @returns {void}
316 */
317 component(fn, component_fn) {
318 push(component_fn);
319 const child = this.child(fn);
320 child.#is_component_body = true;
321 pop();
322 }
323
324 /**
325 * @param {Record<string, any>} attrs

Callers 4

componentFunction · 0.80
Async_in_derivedFunction · 0.80
Props_identifierFunction · 0.80

Calls 3

childMethod · 0.95
pushFunction · 0.90
popFunction · 0.90

Tested by 1

componentFunction · 0.64