在React Native中从NavigationContainer隐藏“ Draver.Screen”

时间:2020-04-27 14:29:32

标签: react-native navigation-drawer react-navigation

在一个简单的应用程序中,我试图隐藏抽屉屏幕Single Category,但没有结果。
我希望Single Category屏幕在隐藏时也应该可用,而不会产生错误:The action NEGATIVE with payload {"name":"Single Category"} was not handled by any navigator.

<NavigationContainer theme={MyTheme}>
  <Drawer.Navigator
    initialRouteName="News Feed"
    drawerStyle={{
      backgroundColor: "#222222",
      width: 240,
    }}
  >
    <Drawer.Screen name="News Feed" component={VideoReuters} />
    <Drawer.Screen name="Categories" component={VideoCategory} />
    <Drawer.Screen name="Single Category" component={SingleCategory} />
  </Drawer.Navigator>
</NavigationContainer>;

有解决此问题的简单方法吗?
谢谢。

0 个答案:

没有答案