Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this user
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
novaisea
/
ReactNativeApp-6001CEM
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
0
Pull requests
0
Projects
0
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Projects
Security
Insights
Files
master
.expo-shared
assets
components
images
.gitignore
App.js
README.md
app.json
babel.config.js
package-lock.json
package.json
yarn.lock
Breadcrumbs
ReactNativeApp-6001CEM
/
App.js
Blame
Blame
Latest commit
History
History
67 lines (59 loc) · 1.97 KB
Breadcrumbs
ReactNativeApp-6001CEM
/
App.js
Top
File metadata and controls
Code
Blame
67 lines (59 loc) · 1.97 KB
Raw
import 'react-native-gesture-handler'; import React from 'react'; import { StyleSheet, LogBox } from 'react-native'; import {NavigationContainer} from '@react-navigation/native'; import {createStackNavigator} from '@react-navigation/stack'; import {createBottomTabNavigator} from '@react-navigation/bottom-tabs'; import { Ionicons } from '@expo/vector-icons'; import HomeScreen from './components/HomeScreen'; import AboutScreen from './components/AboutScreen'; import Recipe1 from './components/Recipe1'; import Recipe2 from './components/Recipe2'; import Recipe3 from './components/Recipe3'; import Recipe4 from './components/Recipe4'; const Tab = createBottomTabNavigator(); const Stack = createStackNavigator(); LogBox.ignoreLogs(['Warning: ...']); // Ignore log notification by message LogBox.ignoreAllLogs();//Ignore all log notifications //Used for Recipe Screens function Root() { return ( <Stack.Navigator> <Stack.Screen name="Home" component={HomeScreen} /> <Stack.Screen name="Recipe1" component={Recipe1} /> <Stack.Screen name="Recipe2" component={Recipe2} /> <Stack.Screen name="Recipe3" component={Recipe3} /> <Stack.Screen name="Recipe4" component={Recipe4} /> </Stack.Navigator> ); } //Used for bottom bar navigation export default function App() { return ( <NavigationContainer> <Tab.Navigator screenOptions={({ route }) => ({ tabBarIcon: ({ focused, color, size }) => { let iconName= "Home"; if (route.name === 'Home') { iconName = 'ios-home'; } else if (route.name === 'Info') { iconName = 'ios-information-circle'; } return <Ionicons name={iconName} size={size} color={color} />; }, })}> <Tab.Screen name="Home" component={Root} /> <Tab.Screen name="Info" component={AboutScreen} /> </Tab.Navigator> </NavigationContainer> ); } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#fff', alignItems: 'center', justifyContent: 'center', }, });
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
You can’t perform that action at this time.