在我的项目中增加多页面,实现页面之间的跳转 .常常要用到路由

React Navigation

  • reactNavigation-docs文档。
  1. RN 0.6.0 以上的 装置。
npm install react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context @react-native-community/masked-viewnpm install @react-navigation/stack
  1. 进入到我的项目 IOS下 应用初始化。
pod-install
  1. 在入口文件App.js 外面引入
import 'react-native-gesture-handler';