how to install react navigation | v5



How to install React Navigation v5


First of all Install  packages in React Native project:
npm install @react-navigation/native


If you are using Expo then run command:

expo install react-native-gesture-handler react-native-reanimated react-native-screens react-native-safe-area-context @react-native-community/masked-view3



Important: install gesture handler and safe area context dependencies:
npm install react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context @react-native-community/masked-view
ignore warnings if you have

If you are on a Mac operating system and developing for iOS, Make sure you have Cocoapods installed.

cd ios; pod install; cd ..

Next you can read How to navigate in react native