useRouteNavigation
- Description
- Params and Return
- Example
Navigation hook to use in onPress events.
Param / Return | Description |
---|---|
param | routeName: the string value for Navigation Route to open |
returns | useRouteNavigation function to use as a closure for onPress events |
How to use the useRouteNavigation component
const MyComponent: FC = () => {
const navigateTo = useRouteNavigation()
return <WideButton onPress={() => navigateTo('Home')} />
}