NavigationLink
Push a value onto the enclosing NavigationStack.
NavigationLink appends value to the path of the enclosing NavigationStack when tapped. It renders as a native Button, so buttonStyle and other modifiers apply.
import { NavigationLink, NavigationStack, Text } from "onescript/views"
<NavigationStack destination={(id: number) => <Text>Order #{id}</Text>}>
<NavigationLink value={1024}>View order #1024</NavigationLink>
</NavigationStack>| Prop | Type | Description |
|---|---|---|
value | string | number | The value appended to the path. |
children | ViewChild | The link label. |
NavigationLink works on the root page, on pushed pages, and inside toolbars. Using it outside a NavigationStack throws an error.
How is this guide?
Last updated on