I am a newbie at react-native and I am facing some issues in the react-native app, after installing ‘react-navigation’, everything is mentioned in the images. Hope you can help me. Have a good day.
Question posted in React native
The official React Native documentation can be found here.
The official React Native documentation can be found here.
2
Answers
First: install @react-navigation/stack by
npm install @react-navigation/stack
using console(console must be opened in your project main directory).
Choose one:
If you are using bare React-Native project install react-gesture-handler using
npm install react-native-gesture-handler
.If you are using expo managed project(e.g you created project using npx expo init) – use
npx expo install react-native-gesture-handler
.Docs: https://reactnavigation.org/docs/stack-navigator/
After successfull install please restart your metro/expo server.
Use
createNativeStackNavigator
fromnative-stack
instead.See Installing the native stack navigator library for details.