feat: add action prop to Link

This commit is contained in:
Satyajit Sahoo
2020-04-27 13:04:00 +02:00
parent b747e527a4
commit 942d2be2c7
7 changed files with 48 additions and 18 deletions

View File

@@ -3,6 +3,7 @@ import { View, StyleSheet, ScrollView } from 'react-native';
import { Button } from 'react-native-paper';
import {
Link,
StackActions,
RouteProp,
ParamListBase,
useLinkTo,
@@ -46,6 +47,13 @@ const ArticleScreen = ({
>
Go to /link-component/Album
</Link>
<Link
to="/link-component/Album"
action={StackActions.replace('Album')}
style={[styles.button, { padding: 8 }]}
>
Replace with /link-component/Album
</Link>
<LinkButton
to="/link-component/Album"
mode="contained"