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.
Utilização
Create routes and tabs
Este tipo é usado por 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>
);
}Declaração do tipo
export interface Destination<R = unknown> {
readonly route: string;
readonly params: RouteParams;
/** Types only: the screen's result. */
readonly [resultType]?: R;
}Membros 2
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
routesó de leitura | string | Sim | — |
paramssó de leitura | RouteParams | Sim | — |
Gerado a partir das declarações TypeScript públicas: assinaturas, props e predefinições vêm da fonte verificada, as descrições da sua JSDoc. Nenhuma predefinição é inventada.