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.

Component

tipo

Componente compilado que puede transferir su estado durante SSR. Es el tipo que exige <component is>, y el del outlet de app/app.meeko y los layouts.

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

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

Declaración #

ts
type Component<Props extends object> = ComponentModule<Props> & {
	readonly renderWithState: (props: Props) => { html: string; state: Record<string, unknown> }
}

Type parameters #

Props extends object

Props del componente.

Example #

meeko
<!-- Card.meeko -->
<script lang="ts">
import type { Component } from "@meekojs/meeko";
const props = defineProps<{ content: Component<{ label: string }>; label: string }>();
</script>
<template><section><component is="props.content" bind:label="props.label"></component></section></template>

See also #

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