![](/img/trans.png)
[英]how to hide back button in React-navigation/react-native
[英]Lost the back button React Native Navigation
我對本機導航欄有問題。 在第三個屏幕(堆棧導航器中的“Auth”)后退按鈕上,我丟失了后退按鈕。 我該如何解決?
我使用這個 function 進行導航:
this.props.navigation.navigate("Choose")
this.props.navigation.navigate("Auth")
NavigationContainer 的代碼:
<View style={styles.container}>
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen name="Root" component={Hello} />
<Stack.Screen name="Choose" component={ChooseMessengers} />
<Stack.Screen name="Auth" component={Auth} />
</Stack.Navigator>
</NavigationContainer>
<StatusBar style="auto" />
</View>
要擁有后退按鈕,您必須將屏幕推送到堆棧頂部。
this.props.navigation.push("Auth")
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.