Skip to content

Commit 2202083

Browse files
committed
Retornos, popToTop, navigate e goBack.
1 parent 1049016 commit 2202083

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Screens/DetailsScreen/index.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,21 @@ export default function DetailsScreen({ navigation }) {
55
return(
66
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
77
<Text>Details Screen</Text>
8+
<Text>Navigation.PUSH</Text>
89
<Button
910
title="Ir para a Details novamente..."
1011
onPress={() => {navigation.push('Details')}}
1112
/>
13+
<Text>Navigation.navigate para a HOME</Text>
14+
<Button
15+
title="Ir para a Home"
16+
onPress={() => {navigation.navigate('Home')}}
17+
/>
18+
<Text>Navigation.popToTop, retorna todas as telas.</Text>
19+
<Button
20+
title="Retornar"
21+
onPress={() => {navigation.popToTop()}}
22+
/>
1223
</View>
1324
);
1425
}

0 commit comments

Comments
 (0)