下一步
你现在熟悉了如何创建堆栈导航器、在屏幕组件上配置它、在路由之间导航以及显示 modals。堆栈导航器及其相关 API 将是 React 导航工具带中最常用的工具,但它们无法解决一些问题。例如,你无法使用堆栈导航器构建基于选项卡的导航 - 为此,你需要使用 底部选项卡导航器。
¥You are now familiar with how to create a stack navigator, configure it on your screen components, navigate between routes, and display modals. Stack navigators and their related APIs will be the most frequently used tools in your React Navigation toolbelt, but there are problems that they don't solve. For example, you can't build tab-based navigation using a stack navigator — for that, you need to use a Bottom Tabs Navigator.
你可以查看侧边栏中的 "导航器" 部分,以了解有关 React Navigation 中可用的不同导航器的更多信息。
¥You can check out the "Navigators" section in the sidebar to learn more about the different navigators available in React Navigation.
文档的其余部分是围绕特定用例组织的,因此你可以根据需要在 "指南" 下的各部分之间跳转(但提前熟悉它们也不会影响你!)。
¥The rest of the documentation is organized around specific use cases, so you can jump between the sections under "Guides" as the need arises (but it also wouldn't hurt you to familiarize yourself with them pre-emptively!).
你可能想要查看的一些指南是:
¥Some of the guides you may want to check out are:
-
身份验证流程:如何处理应用中的身份验证流程。
¥Authentication flows: How to handle authentication flows in your app.
-
支持安全区域:如何处理应用中的状态栏等安全区域。
¥Supporting safe areas: How to handle safe areas such as statusbar in your app.
-
深层链接:如何处理应用中的深度链接和通用链接。
¥Deep linking: How to handle deep linking and universal links in your app.
-
主题:如何自定义各种 UI 元素的外观。
¥Themes: How to customize the look and feel of various UI elements.
-
使用 Jest 进行测试:如何测试你的导航组件。
¥Testing with Jest: How to test your navigation components.
-
配置 TypeScript:如何为 React Navigation 配置 TypeScript。
¥Configuring TypeScript: How to configure TypeScript for React Navigation.
虽然大多数用户不需要这样做,但如果你很好奇并想了解有关 React Navigation 工作原理的更多信息,建议你阅读 导航状态参考 和 构建你自己的导航器 部分。
¥While most users won't need to do this, if you are curious and want to learn more about how React Navigation works, it's recommended to work through the Navigation State reference and Build your own Navigator sections.
祝你好运!
¥Good luck!