reactjs - Differents drawer navigator for each user type in React Native
问题描述
I'm new using react native, and I came across a problem / question. I am implementing an application with two different user types: Teacher and Student. I would like to offer each type of user a drawer navigator appropriate to their functions.
Currently I have a stack navigator with login screens and after login I would like to know if it is possible to instantiate a different drawer for each type of user. The structure I am wanting is as follows:
Sorry for any mistake, I'm Brazilian and I'm using translator.
解决方案
Drawer navigator supports a custom component for the content: https://reactnavigation.org/docs/en/drawer-navigator.html#providing-a-custom-contentcomponent
You can provide a custom React component where you conditionally render different content based on the user type.
推荐阅读
- gulp - Gulp - 何时返回值,何时不返回
- filter - 创建自定义过滤器
- jenkins - 詹金斯大师:无法使用管理员登录:管理员
- angular - 在 VueJs 应用程序中使用 Angular6 应用程序
- node.js - Typescript - 我可以将类型从一个模块“固定”到另一个模块吗?
- zenhub - 无法通过 REST API 添加问题以发布报告
- python - Argparse - 使用带有必要和不必要参数的标志的便捷方法?
- asp.net-core-webapi - 在 .netcore 2 中查询加密数据
- android - 抛出异常并在 logcat 中以“错误”级别打印其堆栈跟踪
- hibernate - 如何从休眠中的多对多关系中检索数据?