All app routes are specified in routes.tsx.
For navigation, it is recommended to use the RouterLink component. It wraps Touchable and enables navigation to a specific route when pressed. It also supports prefetching the route as it comes into view.
<RouterLink to="/my-route" navigationProps={{ filters: ["my-filter"] }} onPress={onPress}>
{children}
</RouterLink>When wrapping another component that needs the onPress event, hasChildTouchable can be passed to RouterLink. Note that onPress from the child won't be called.
<RouterLink hasChildTouchable to="/my-route" onPress={onPress}>
<Button>Ok</Button>
</RouterLink>Prefetching can be disabled by passing disablePrefetch to RouterLink.
<RouterLink to="/my-route" disablePrefetch>
Click Me
</RouterLink>Alternatively, navigate can be used with onPress to programmatically navigate to a given route (not recommended because it does not support prefetching).
navigate("/my-route")