Closed Rivzmarere closed 3 years ago
The app.js
import 'react-native-gesture-handler'; import * as React from 'react'; import { StyleSheet, View, Text } from 'react-native'; import { NavigationContainer } from '@react-navigation/native'; import { createStackNavigator } from '@react-navigation/stack'; import { createDrawerNavigator } from '@react-navigation/drawer'; import Login from './scr/components/Login/Login'; import splash from './Splash'; import Home from './scr/components/Home/Home'; import Canteen from './scr/components/Canteen/Canteen'; import ChartBox from './scr/components/ChartBox/ChartBox'; const Stack = createStackNavigator(); const Drawer = createDrawerNavigator(); function DrawerROutes() { return ( <Drawer.Navigator initialRouteName="Home"> <Drawer.Screen name="Home" component={Home} /> <Drawer.Screen name="Canteen" component={Canteen} /> <Drawer.Screen name="ChartBox" component={ChartBox} /> </Drawer.Navigator> ); } function App() { return( <NavigationContainer> <Stack.Navigaor> <Stack.Screen name="splash" component={splash}/> <Stack.Screen name="Login" component={Login}/> <Stack.Screen name="Home" component={DrawerROutes}/> </Stack.Navigaor> </NavigationContainer> ); } const styles = StyleSheet.create({ container:{ flex: 1, backgroundColor: '#F5FCFF', } }) export default App;
The dependencies
"dependencies": { "@react-native-community/masked-view": "^0.1.11", "@react-navigation/drawer": "^5.12.5", "@react-navigation/native": "^5.9.4", "@react-navigation/stack": "^5.14.4", "install": "^0.13.0", "npm": "^7.11.2", "react": "17.0.1", "react-native": "0.64.0", "react-native-gesture-handler": "^1.10.3", "react-native-reanimated": "^1.13.3", "react-native-safe-area-context": "^3.2.0", "react-native-screens": "^3.1.1", "react-native-shared-element": "^0.7.0", "react-navigation": "^4.4.4", "react-navigation-drawer": "^2.7.1", "react-navigation-shared-element": "^2.3.1", "react-navigation-stack": "^2.10.4" }
I think you have a typo; you wrote Stack.Navigaor instead of Stack.Navigator
Stack.Navigaor
Stack.Navigator
Your example doesn't event reference react-navigation-shared-element. Closing this issue
react-navigation-shared-element
The app.js
The dependencies