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.

ClientPageLoadContext

interfaz

Contexto del loader de una página render: "client", que se ejecuta en el navegador sin request ni context.

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

Source code src/app/definitions/define-page.ts:108

Declaración #

ts
interface ClientPageLoadContext<P extends PageSchema | undefined, S extends PageSchema | undefined> {
	readonly url: URL
	readonly params: Params<P>
	readonly search: Search<S>
	readonly signal: AbortSignal
	readonly state: StateStore
}

Type parameters #

P extends PageSchema | undefined

Schema de params, o undefined.

S extends PageSchema | undefined

Schema de search, o undefined.

Example #

ts
import { definePage } from "@meekojs/meeko/framework";

export const route = definePage({
  render: "client",
  load: async ({ url, signal }) => api.notes.list({ query: { q: url.searchParams.get("q") ?? "" }, signal }),
});

Propiedades #

url #

propiedad sólo lectura

readonly url: URL

URL de destino.

params #

propiedad sólo lectura

readonly params: Params<P>

Parámetros de la ruta.

propiedad sólo lectura

readonly search: Search<S>

Parámetros de búsqueda.

signal #

propiedad sólo lectura

readonly signal: AbortSignal

Se aborta si la navegación se cancela.

state #

propiedad sólo lectura

readonly state: StateStore

Estado provisional, que se aplica al confirmar la ruta.

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/definitions/define-page.ts