我有以下导航器:
const s3flow = createStackNavigator({
S3: Screen3,
S4: Screen4
});
const tab1Flow = createStackNavigator({
S1: Screen1,
S2: Screen2,
s3flow: s3flow
});
const switchNavigator = createSwitchNavigator({
loginFlow: createStackNavigator({
Signup: SignupScreen,
Signin: SigninScreen
}),
mainFlow: createBottomTabNavigator({
tab1Flow: tab1Flow,
Tab2: Tab2Screen,
Tab3: Tab3Screen
})
});
switchNavigator是根导航器。 我在Screen3中,然后导航到Screen4。
当我在Screen4中按回时,我希望返回到Screen3,但它又返回到Screen1(父亲的堆栈导航器的默认值)。
如何解决此问题?