我正在尝试在我的应用程序的每个屏幕中显示底部 TabBar,但我还找不到在 RN V5 中执行此操作的方法,
所以当我尝试这样使用tabBarVisible
时
<BottomTab.Navigator
lazy={false}
tabBar={props => <TabBar {...props} />}
screenOptions={({route}) => (
console.log('route', route), it's just log the five bottom component i have
{
tabBarVisible: ({routes}) => {
let tabBarVisible = false;
console.log('screens', routes); // Not log anything!
return {tabBarVisible};
},
}
)}
....
>
... 5 Tabs here
</BottomTab.Navigator>
那么我该如何处理这种情况呢?并访问其他堆栈屏幕?
只是为了最小化有问题的代码片段
这是完整的根文件代码,你能检查一下吗?