在一个简单的应用程序中,我试图隐藏抽屉屏幕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>;
有解决此问题的简单方法吗?
谢谢。