javascript - react native:navigation 5 - 如何从 Tab.Navigator 返回?
问题描述
导航 5 - 如何从 Tab.Navigator 返回?问题是,如果我现在在一个特定的 Tab.Navigator 中然后尝试返回,那么它会继续在 Tab.Navigator 中从右到左导航我,然后返回并退出 Tab.Navigator。我不明白如何防止这种情况。我只是希望当我在某个 Tab.Navigator 中并想从中返回时,他不会在同一个 Tab.Navigator 中导航我,而是会按照我的意愿返回。
这是我的标签示例:
export default function TopTabs() {
return (
<Tab.Navigator
tabBarOptions={{
activeTintColor: 'black',
// inactiveTintColor: 'grey',
indicatorStyle: {
// backgroundColor: 'red',
},
style: {
// backgroundColor: '#8bb8ef',
},
labelStyle: {
fontSize: 18,
fontWeight: 'bold',
},
}}
>
<Tab.Screen
name="bomb"
component={ReshimatDrishotLebitzua}
/>
<Tab.Screen name="frog" component={DrishotSheTuplu} />
</Tab.Navigator>
);
}
解决方案
推荐阅读
- ios - 在 iOS 上使用 swift 绘制视图后,以编程方式绘制新图层以查看
- python - Matplotlib 版本与 Anaconda 版本不匹配
- azure - 无法访问视频索引器 API?
- c# - C# 在彼此内部使用 const 字符串和参数
- javascript - Mesh 使用了太多的绘制调用
- json - Android Studio Gradle 错误:缺少 project_info 对象
- jquery - 为 jQuery UI 模式对话框设置 Cookie
- javascript - 在Javascript中单击按钮更改按钮的颜色
- php - 检查数组中的相同值
- java - Java中的抽象类层次结构