|
@@ -35,82 +35,82 @@ export default class App {
|
35
|
35
|
startApp(root) {
|
36
|
36
|
switch (root) {
|
37
|
37
|
case 'login':
|
38
|
|
- Navigation.startSingleScreenApp({
|
39
|
|
- screen: {
|
40
|
|
- screen: 'example.LoginScreen',
|
41
|
|
- title: 'Login',
|
42
|
|
- navigatorStyle: {}
|
43
|
|
- },
|
44
|
|
- passProps: {
|
45
|
|
- str: 'This is a prop passed in \'startSingleScreenApp()\'!',
|
46
|
|
- obj: {
|
47
|
|
- str: 'This is a prop passed in an object!',
|
48
|
|
- arr: [
|
49
|
|
- {
|
50
|
|
- str: 'This is a prop in an object in an array in an object!'
|
51
|
|
- }
|
52
|
|
- ],
|
53
|
|
- arr2: [
|
54
|
|
- [
|
55
|
|
- 'array of strings',
|
56
|
|
- 'with two strings'
|
57
|
|
- ],
|
58
|
|
- [
|
59
|
|
- 1, 2, 3
|
60
|
|
- ]
|
61
|
|
- ]
|
62
|
|
- },
|
63
|
|
- num: 1234,
|
64
|
|
- fn: function() {
|
65
|
|
- return 'Hello from a function!';
|
66
|
|
- }
|
67
|
|
- }
|
68
|
|
- });
|
69
|
38
|
// Navigation.startSingleScreenApp({
|
70
|
|
- // screen: {
|
71
|
|
- // screen: 'example.FirstTabScreen',
|
72
|
|
- // title: 'Login',
|
73
|
|
- // topTabs: [
|
74
|
|
- // {
|
75
|
|
- // screenId: 'example.ListScreen',
|
76
|
|
- // title: 'Tab1',
|
77
|
|
- // passProps: {
|
78
|
|
- // str: 'This is a prop passed to Tab1'
|
79
|
|
- // }
|
80
|
|
- // },
|
81
|
|
- // {
|
82
|
|
- // screenId: 'example.PushedScreen',
|
83
|
|
- // title: 'Tab2',
|
84
|
|
- // passProps: {
|
85
|
|
- // str: 'This is a prop passed to Tab2'
|
86
|
|
- // }
|
87
|
|
- //
|
88
|
|
- // },
|
89
|
|
- // {
|
90
|
|
- // screenId: 'example.PushedScreen',
|
91
|
|
- // title: 'Tab3',
|
92
|
|
- // passProps: {
|
93
|
|
- // str: 'This is a prop passed to Tab3'
|
94
|
|
- // }
|
95
|
|
- // },
|
96
|
|
- // {
|
97
|
|
- // screenId: 'example.FirstTabScreen',
|
98
|
|
- // title: 'Tab4',
|
99
|
|
- // passProps: {
|
100
|
|
- // str: 'This is a prop passed to Tab4',
|
101
|
|
- // fn: () => 'Hello from a function passed as passProps!'
|
102
|
|
- // }
|
103
|
|
- // }
|
104
|
|
- // ],
|
105
|
|
- // navigatorStyle: {}
|
106
|
|
- // },
|
107
|
|
- // drawer: { // optional, add this if you want a side menu drawer in your app
|
108
|
|
- // left: { // optional, define if you want a drawer from the left
|
109
|
|
- // screen: 'example.SideMenu' // unique ID registered with Navigation.registerScreen
|
110
|
|
- // },
|
111
|
|
- // disableOpenGesture: false // optional, can the drawer be opened with a swipe instead of button
|
112
|
|
- // }
|
|
39
|
+ // screen: {
|
|
40
|
+ // screen: 'example.LoginScreen',
|
|
41
|
+ // title: 'Login',
|
|
42
|
+ // navigatorStyle: {}
|
|
43
|
+ // },
|
|
44
|
+ // passProps: {
|
|
45
|
+ // str: 'This is a prop passed in \'startSingleScreenApp()\'!',
|
|
46
|
+ // obj: {
|
|
47
|
+ // str: 'This is a prop passed in an object!',
|
|
48
|
+ // arr: [
|
|
49
|
+ // {
|
|
50
|
+ // str: 'This is a prop in an object in an array in an object!'
|
|
51
|
+ // }
|
|
52
|
+ // ],
|
|
53
|
+ // arr2: [
|
|
54
|
+ // [
|
|
55
|
+ // 'array of strings',
|
|
56
|
+ // 'with two strings'
|
|
57
|
+ // ],
|
|
58
|
+ // [
|
|
59
|
+ // 1, 2, 3
|
|
60
|
+ // ]
|
|
61
|
+ // ]
|
|
62
|
+ // },
|
|
63
|
+ // num: 1234,
|
|
64
|
+ // fn: function() {
|
|
65
|
+ // return 'Hello from a function!';
|
|
66
|
+ // }
|
|
67
|
+ // }
|
113
|
68
|
// });
|
|
69
|
+ Navigation.startSingleScreenApp({
|
|
70
|
+ screen: {
|
|
71
|
+ screen: 'example.FirstTabScreen',
|
|
72
|
+ title: 'Login',
|
|
73
|
+ topTabs: [
|
|
74
|
+ {
|
|
75
|
+ screenId: 'example.ListScreen',
|
|
76
|
+ title: 'Tab1',
|
|
77
|
+ passProps: {
|
|
78
|
+ str: 'This is a prop passed to Tab1'
|
|
79
|
+ }
|
|
80
|
+ },
|
|
81
|
+ {
|
|
82
|
+ screenId: 'example.PushedScreen',
|
|
83
|
+ title: 'Tab2',
|
|
84
|
+ passProps: {
|
|
85
|
+ str: 'This is a prop passed to Tab2'
|
|
86
|
+ }
|
|
87
|
+
|
|
88
|
+ },
|
|
89
|
+ {
|
|
90
|
+ screenId: 'example.PushedScreen',
|
|
91
|
+ title: 'Tab3',
|
|
92
|
+ passProps: {
|
|
93
|
+ str: 'This is a prop passed to Tab3'
|
|
94
|
+ }
|
|
95
|
+ },
|
|
96
|
+ {
|
|
97
|
+ screenId: 'example.FirstTabScreen',
|
|
98
|
+ title: 'Tab4',
|
|
99
|
+ passProps: {
|
|
100
|
+ str: 'This is a prop passed to Tab4',
|
|
101
|
+ fn: () => 'Hello from a function passed as passProps!'
|
|
102
|
+ }
|
|
103
|
+ }
|
|
104
|
+ ],
|
|
105
|
+ navigatorStyle: {}
|
|
106
|
+ },
|
|
107
|
+ drawer: { // optional, add this if you want a side menu drawer in your app
|
|
108
|
+ left: { // optional, define if you want a drawer from the left
|
|
109
|
+ screen: 'example.SideMenu' // unique ID registered with Navigation.registerScreen
|
|
110
|
+ },
|
|
111
|
+ disableOpenGesture: false // optional, can the drawer be opened with a swipe instead of button
|
|
112
|
+ }
|
|
113
|
+ });
|
114
|
114
|
return;
|
115
|
115
|
case 'after-login':
|
116
|
116
|
Navigation.startTabBasedApp({
|