-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
39 lines (32 loc) · 828 Bytes
/
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
37
38
39
import React,{ Component } from 'react';
import { StyleSheet, Text, View, ScrollView, Platform } from 'react-native';
import { MyContext } from './src/context';
import StageOne from './src/components/stage_one';
import StageTwo from './src/components/stage_two';
class App extends Component {
static contextType = MyContext;
render(){
return (
<ScrollView>
<View style={styles.container}>
{
this.context.state.stage === 1 ?
<StageOne/>
:
<StageTwo/>
}
</View>
</ScrollView>
)
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#aaf0e8',
alignItems: 'center',
justifyContent: 'center',
marginTop:Platform.OS === 'ios' ? 80 : 10
},
});
export default App;