importReactfrom'react';import{NavigationContainer}from'@react-navigation/native';exportdefaultfunctionApp(){return(<NavigationContainer>{/* Rest of your app code */}</NavigationContainer>);}
Install Drawer Navigation package & other dependencies
yarn add @react-navigation/drawer react-native-gesture-handler react-native-reanimated
cd ios && arch -x86_64 pod install
Setup react-native-gesture-handler in index.js
import{AppRegistry}from'react-native';importAppfrom'./App';import{nameasappName}from'./app.json';import'react-native-gesture-handler';// this line addAppRegistry.registerComponent(appName,()=>App);
Settings up react-native-reanimated/plugin
module.exports={presets: ['module:metro-react-native-babel-preset'],plugins: ['react-native-reanimated/plugin'],// this line add};
Update permissions in AndroidManifest.xml file for android
<!-- Camera permission required to access picture from camera -->
<uses-permissionandroid:name="android.permission.CAMERA" />
Update permission in info.plist for ios
<key>NSPhotoLibraryUsageDescription</key><string>This app uses the gallery to update photo of your profile</string><key>NSCameraUsageDescription</key><string>This app uses the camera to take pictures for updating profile photo</string>
Add Custom Font Family To Your Application
Create a file named react-native.config.js
module.exports={project: {ios: {},android: {},},assets: ['./src/assets/fonts'],// path to the fonts directory};
Run the following command to add all the assets to both the platforms