简体   繁体   English

登录前后如何在React Native中更改我的抽屉导航器的选项

[英]How can i change the options of my drawerNavigator in React Native before and after loged in

Before Login i have these options. 登录之前,我有这些选项。

Home, Free Services, Signals, Contact Us, Login, Signup 主页,免费服务,信号,联系我们,登录,注册

i want to add more and also change some options after login 我想添加更多,并且登录后还要更改一些选项

Home, Free Services, Paid Services, Free Signals, Paid Signals, Contact us, Logout 主页,免费服务,付费服务,免费信号,付费信号,联系我们,注销

Please Resolve my issue how can i do this. 请解决我的问题,我该怎么做。

When your react native app has authentication you should use SwitchNavigator. 当您的本机响应应用程序进行身份验证时,您应该使用SwitchNavigator。

Read this page from the react navigation documentation: https://reactnavigation.org/docs/en/auth-flow.html 从react导航文档中阅读以下页面: https : //reactnavigation.org/docs/en/auth-flow.html

Before login you use the 'Auth' stack and after login you use the 'App' stack. 登录前,您使用“身份验证”堆栈,登录后,您使用“应用程序”堆栈。 Each stack has its own navigator. 每个堆栈都有自己的导航器。 The AuthLoadingScreen checks if the user is logged in and uses the appropriate stack. AuthLoadingScreen检查用户是否已登录并使用适当的堆栈。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 React Native 如何在用户关闭应用程序时保持用户登录状态 - React Native How Do I keep the user Loged in when he close the app 如何在 React Native 上使用 StackNavigator 和 DrawerNavigator 和 SwitchNavigator? - How to use StackNavigator with DrawerNavigator and SwitchNavigator on React Native? 如何在反应原生 1 秒后更改背景? - how can i change background after 1 second in react native? 如何在React Native页面中安排状态更改? - How can I orchestrate state change in my React Native page? 在 DrawerNavigator 中反应本机注销 - React native log out in DrawerNavigator 使用 DrawerNavigator [React native] 导航到 URL/深层链接 - Navigate to URL/Deep Link with DrawerNavigator [React native] React-Native-通过抽屉导航器传递参数 - React-native - passing params with drawerNavigator 两侧都有React-Native DrawerNavigator菜单 - React-Native DrawerNavigator Menu on both sides 如何更改它之外的样式表属性? 反应本机 - How can i change a stylesheet attribute outside it? React Native 如何在 React Native 的平面列表中更改所选项目的颜色? - How can I change the color of selected item in flatlist in React Native?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM