Skip to content
Meeko
Type to search the guides and the API reference. Open it from any page with / or Ctrl K; move with the arrow keys and open a result with Enter.
Get started

Contents

On this page

Not translated yet

This page has not been translated into English yet, so it is shown in Spanish.

ComponentRelease

interfaz

Función que libera una instancia hidratada: observadores, eventos y limpiezas. Puede exponer el estado editable de la instancia y, desde 1.1, el valor de su defineExpose.

ts
import type { ComponentRelease } from "@meekojs/meeko";

Source code src/app/runtime/renderer.ts:106

Declaración #

ts
interface ComponentRelease<Exposed = unknown> {
	(): void
	snapshot?: () => Record<string, unknown>
	readonly exposed?: Exposed
}

Type parameters #

Exposed = unknown

Tipo del valor expuesto.

Example #

ts
import type { ComponentRelease } from "@meekojs/meeko";
import { hydrateScope } from "./SearchBox.meeko";

const release: ComponentRelease = hydrateScope({ root: document.querySelector("#search")! }, {});
console.log(release.snapshot?.(), release.exposed);
release();

Miembros #

(llamada) #

firma de llamada

(): void

snapshot #

propiedad opcional

snapshot?: () => Record<string, unknown>

Lee el estado editable actual de la instancia.

exposed #

propiedad sólo lectura opcional

readonly exposed?: Exposed

Valor del defineExpose de la instancia, o null si no lo tiene.

Was this page helpful?

Add a comment

It is sent when you choose “Yes” or “No”. Only the page, your answer and the comment are stored: no cookies and no personal data.

0 of 2000 characters

Edit on GitHub: packages/meeko/src/app/runtime/renderer.ts