安装
yarn add @react-navigation/drawer react-native-gesture-handler react-native-reanimated
在index.js
最顶部
import 'react-native-gesture-handler';
iOS下
cd ios && pod install && cd ..
使用
import * as React from 'react';
import { View, Text } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createDrawerNavigator } from '@react-navigation/drawer';
function Home() {
return (
...