Destination
What to show: a route by name and its params, as routes.show({ id: 42 })
makes it. R is what its screen dismisses with, for present.
Verwendung
Create routes and tabs
Dieser Typ wird verwendet von Link
// app/(shows)/index.tsx
import { Link, Text, VStack, routes, type RouteOptions } from 'kuito';
export const options: RouteOptions = { title: 'Shows' };
export default function Shows() {
return (
<VStack gap={12} padding={20}>
<Link to={routes.show({ id: 42 })}>
<Text>Show 42</Text>
</Link>
</VStack>
);
}Typdeklaration
export interface Destination<R = unknown> {
readonly route: string;
readonly params: RouteParams;
/** Types only: the screen's result. */
readonly [resultType]?: R;
}Mitglieder 2
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
routeschreibgeschützt | string | Ja | — |
paramsschreibgeschützt | RouteParams | Ja | — |
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.