|
@@ -4,15 +4,26 @@ import {StyleSheet, View, Button} from 'react-native';
|
4
|
4
|
class MyClass extends React.Component {
|
5
|
5
|
|
6
|
6
|
onShowModal = () => {
|
7
|
|
- this.props.navigator.toggleDrawer({
|
8
|
|
- side: 'left'
|
9
|
|
- });
|
|
7
|
+ this.toggleDrawer();
|
10
|
8
|
this.props.navigator.showModal({
|
11
|
9
|
screen: 'example.Types.Modal',
|
12
|
10
|
title: `Modal`
|
13
|
11
|
});
|
14
|
12
|
};
|
15
|
13
|
|
|
14
|
+ onPushToFirstTab = () => {
|
|
15
|
+ this.toggleDrawer();
|
|
16
|
+ this.props.navigator.handleDeepLink({
|
|
17
|
+ link: 'tab1/example.Types.Push'
|
|
18
|
+ });
|
|
19
|
+ };
|
|
20
|
+
|
|
21
|
+ toggleDrawer = () => {
|
|
22
|
+ this.props.navigator.toggleDrawer({
|
|
23
|
+ side: 'left'
|
|
24
|
+ });
|
|
25
|
+ };
|
|
26
|
+
|
16
|
27
|
render() {
|
17
|
28
|
return (
|
18
|
29
|
<View style={styles.container}>
|
|
@@ -21,6 +32,11 @@ class MyClass extends React.Component {
|
21
|
32
|
onPress={this.onShowModal}
|
22
|
33
|
title="Show Modal"/>
|
23
|
34
|
</View>
|
|
35
|
+ <View style={styles.button}>
|
|
36
|
+ <Button
|
|
37
|
+ onPress={this.onPushToFirstTab}
|
|
38
|
+ title="Push to First Tab"/>
|
|
39
|
+ </View>
|
24
|
40
|
</View>
|
25
|
41
|
);
|
26
|
42
|
}
|