File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -22,14 +22,22 @@ function HomeScreen({
22
22
title = "Navigate to Screen 1"
23
23
onPress = { ( ) => navigation . navigate ( 'NestedStack' ) }
24
24
/>
25
+ < Button
26
+ title = "Navigate to Screen (same stack)"
27
+ onPress = { ( ) => navigation . navigate ( 'MainStackScreen' ) }
28
+ />
25
29
</ View >
26
30
) ;
27
31
}
28
32
29
- function MainStackScreen ( ) {
33
+ function MainStackScreen ( { navigation } : NativeStackScreenProps < StackParamList , 'MainStackScreen' > ) {
30
34
return (
31
35
< View style = { { flex : 1 , alignItems : 'center' , justifyContent : 'center' } } >
32
36
< Text > Main stack screen</ Text >
37
+ < Button
38
+ title = "goBack"
39
+ onPress = { ( ) => navigation . goBack ( ) }
40
+ />
33
41
</ View >
34
42
) ;
35
43
}
Original file line number Diff line number Diff line change @@ -1288,7 +1288,7 @@ - (void)invalidate
1288
1288
// with modal presentation or foreign modal presented from inside a Screen.
1289
1289
- (void )dismissAllRelatedModals
1290
1290
{
1291
- [_controller dismissViewControllerAnimated: NO completion: nil ];
1291
+ [_controller dismissViewControllerAnimated: YES completion: nil ];
1292
1292
1293
1293
// This loop seems to be excessive. Above message send to `_controller` should
1294
1294
// be enough, because system dismisses the controllers recursively,
You can’t perform that action at this time.
0 commit comments