-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
executable file
·36 lines (32 loc) · 1 KB
/
app.js
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
import React, { Component } from 'react';
import { Platform, StatusBar, StyleSheet, View } from 'react-native';
import { NavigationContext, NavigationProvider, StackNavigation } from '@expo/ex-navigation';
import Router from './navigation/Router';
import Store from './reducers';
const navigationContext = new NavigationContext({
router: Router,
store: Store,
})
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
},
statusBarUnderlay: {
height: 24,
backgroundColor: 'rgba(0,0,0,0.2)',
},
});
export default class AppComponent extends Component {
render() {
return (
<View style={styles.container}>
<NavigationProvider context={navigationContext}>
<StackNavigation id="root" initialRoute={Router.getRoute('rootNavigation')} />
</NavigationProvider>
{Platform.OS === 'ios' && <StatusBar barStyle="default" />}
{Platform.OS === 'android' && <View style={styles.statusBarUnderlay} />}
</View>
)
}
}