-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLayout.js
More file actions
29 lines (25 loc) · 770 Bytes
/
Layout.js
File metadata and controls
29 lines (25 loc) · 770 Bytes
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
import React, { Component } from 'react';
import { View, Text } from 'react-native';
import { DefaultRenderer, Actions } from 'react-native-router-flux';
import Button from 'react-native-button';
export default class Layout extends Component {
constructor(props) {
super(props)
}
_handlePress() {
console.log('pressed');
}
render() {
const goToPageTwo = () => Actions.pageTwo({text: 'Hello World!'});
const state = this.props.navigationState;
const children = state.children;
return (
<View style={{margin: 120}}>
<Text>Layout txt</Text>
<Button onPress={goTo}>Page Two</Button>
<DefaultRenderer navigationState={children[0]}
onNavigate={this.props.onNavigate} />
</View>
)
}
}