Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 918 Bytes

routing.md

File metadata and controls

28 lines (20 loc) · 918 Bytes

Routing

All app routes are specified in routes.tsx.

RouterLink & RouterButton Components

The RouterLink component 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 using a button for navigation, RouterButton can be used.

<RouterButton to="/my-route" navigationProps={{ filters: ["my-filter"]}} onPress={onPress}>
  {children}
</RouterButton>

Alternatively, navigate can be used with onPress to programmatically navigate to a given route.