Installation

Install the react-navigation package in your React Native project.

yarn add react-navigation
# or with npm
# npm install --save react-navigation

Next, install react-native-gesture-handler. If you’re using the Expo managed workflow then you don’t need to do anything here, it’s included in the SDK. Otherwise:

yarn add react-native-gesture-handler
# or with npm
# npm install --save react-native-gesture-handler

Link all native dependencies:

react-native link react-native-gesture-handler

 https://reactnavigation.org/docs/en/getting-started.html

参考:https://www.cnblogs.com/maopixin/p/10034763.html

04-06 03:30