-
Notifications
You must be signed in to change notification settings - Fork 67
/
Page.js
47 lines (39 loc) · 841 Bytes
/
Page.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
40
41
42
43
44
45
46
47
'use strict';
import React, { Component,PropTypes } from 'react';
import {
StyleSheet,
View,
Text,
TouchableHighlight
} from 'react-native';
class Page extends Component {
propTypes = {
goToPage: PropTypes.func,
nextPage: PropTypes.number
}
render() {
return (
<View style={styles.container}>
<TouchableHighlight onPress={()=>{
this.props.goToPage(this.props.nextPage);
}}
>
<Text>Click to next page: Tab{this.props.nextPage + 1}</Text>
</TouchableHighlight>
</View>
);
}
componentDidMount() {
console.log('mounted');
}
}
const styles = StyleSheet.create({
container: {
alignItems: 'center',
justifyContent: 'center',
flexDirection: 'column',
flex: 1,
backgroundColor: '#FAEBD7',
}
});
export default Page;