navigate
Shows to (docs/navigation.md#moving-between-routes).
Verwendung
Use typed destinations
import { Button, Link, Text, VStack, goBack, navigate, routes } from 'kuito';
export function Actions() {
return (
<VStack gap={8}>
<Button onPress={() => navigate(routes.show({ id: 7 }))}>Open show 7</Button>
<Button onPress={() => navigate(routes.show({ id: 8 }), { replace: true })}>
Replace with show 8
</Button>
<Link to={routes.profile()}>
<Text>Profile</Text>
</Link>
<Button onPress={goBack}>Back</Button>
</VStack>
);
}Signaturen
(to: Destination, options?: { replace?: boolean; }): voidParameter
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
to | Destination<unknown> | Ja | — |
options | { replace?: boolean;} | Nein | — |
Rückgabe
void
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.