How Do I Solve React Native Navigation.navigate Error
It's my first time using react native and I want to move to another screen (slide2), I have an error which reads 'Undefined is not an object (evaluating navigation.navigate)' I am
Solution 1:
Your index.js file is incorrect just replace index.js file with this
import'react-native-gesture-handler';
import {NavigationContainer} from'@react-navigation/native';
import {createStackNavigator} from'@react-navigation/stack';
import {AppRegistry} from'react-native';
importAppfrom'./App';
import {name as appName} from'./app.json';
AppRegistry.registerComponent(appName, () =>App);
you should register App as AppRegistry component instead you are registering SlideOne
Post a Comment for "How Do I Solve React Native Navigation.navigate Error"