用途:为 React Native/Expo 应用实现导航结构,包括 Stack、Tab、Drawer 导航器,深度链接与通用链接,TypeScript 类型安全导航,以及认证流程处理。
自动触发场景:搭建应用导航结构、实现认证流程、配置深度链接、构建复杂嵌套导航器。
提供脚本:scripts/setup-navigation.sh 安装导航依赖;scripts/generate-types.sh 生成 TypeScript 导航类型。
提供模板:templates/root-layout.tsx(含认证流程的根布局)、templates/tabs-layout.tsx(Tab 导航布局)、templates/navigation-types.ts(TypeScript 类型定义)、templates/linking-config.ts(深度链接配置)。
导航结构示例:app/_layout.tsx 为根布局(含认证检查);app/(tabs)/ 下含 _layout.tsx、index.tsx、profile.tsx;app/auth/ 下含 login.tsx、register.tsx;app/[id].tsx 为动态路由。
最佳实践:使用 expo-router 实现基于文件的路由;导航类型集中放在专用文件;在根层级实现认证;为两种 scheme 配置深度链接。
限制:资料未提供具体依赖版本、平台兼容范围、收费或价格信息,暂未提供。