Guy Carmeli 8 лет назад
Родитель
Сommit
1b1fc3aed2
1 измененных файлов: 66 добавлений и 35 удалений
  1. 66
    35
      example-redux/src/app.js

+ 66
- 35
example-redux/src/app.js Просмотреть файл

@@ -70,42 +70,73 @@ export default class App {
70 70
           });
71 71
         } else {
72 72
           Navigation.startSingleScreenApp({
73
-            screen: {
74
-              title: 'Example',
75
-              screen: 'example.TopTabsScreen',
76
-              topTabs: [
77
-                {
78
-                  screenId: 'example.FirstTabScreen',
79
-                  title: 'Tab1',
80
-                  passProps: {
81
-                    str: 'This is a prop passed to Tab1',
82
-                    fn: () => 'Hello from a function passed as passProps!'
83
-                  }
84
-                },
85
-                {
86
-                  screenId: 'example.PushedScreen',
87
-                  title: 'Tab2',
88
-                  passProps: {
89
-                    str: 'This is a prop passed to Tab2'
90
-                  }
91
-                },
92
-                {
93
-                  screenId: 'example.ListScreen',
94
-                  title: 'Tab3',
95
-                  passProps: {
96
-                    str: 'This is a prop passed to Tab3'
97
-                  }
98
-                }
99
-              ],
100
-              navigatorStyle: {}
101
-            },
102
-            drawer: { // optional, add this if you want a side menu drawer in your app
103
-              left: { // optional, define if you want a drawer from the left
104
-                screen: 'example.SideMenu' // unique ID registered with Navigation.registerScreen
105
-              },
106
-              disableOpenGesture: false // optional, can the drawer be opened with a swipe instead of button
107
-            }
73
+           screen: {
74
+             screen: 'example.LoginScreen',
75
+             title: 'Login',
76
+             navigatorStyle: {}
77
+           },
78
+           passProps: {
79
+             str: 'This is a prop passed in \'startSingleScreenApp()\'!',
80
+             obj: {
81
+               str: 'This is a prop passed in an object!',
82
+               arr: [
83
+                 {
84
+                   str: 'This is a prop in an object in an array in an object!'
85
+                 }
86
+               ],
87
+               arr2: [
88
+                 [
89
+                   'array of strings',
90
+                   'with two strings'
91
+                 ],
92
+                 [
93
+                   1, 2, 3
94
+                 ]
95
+               ]
96
+             },
97
+             num: 1234,
98
+             fn: function() {
99
+               return 'Hello from a function!';
100
+             }
101
+           }
108 102
           });
103
+          // Navigation.startSingleScreenApp({
104
+          //   screen: {
105
+          //     title: 'Example',
106
+          //     screen: 'example.TopTabsScreen',
107
+          //     topTabs: [
108
+          //       {
109
+          //         screenId: 'example.FirstTabScreen',
110
+          //         title: 'Tab1',
111
+          //         passProps: {
112
+          //           str: 'This is a prop passed to Tab1',
113
+          //           fn: () => 'Hello from a function passed as passProps!'
114
+          //         }
115
+          //       },
116
+          //       {
117
+          //         screenId: 'example.PushedScreen',
118
+          //         title: 'Tab2',
119
+          //         passProps: {
120
+          //           str: 'This is a prop passed to Tab2'
121
+          //         }
122
+          //       },
123
+          //       {
124
+          //         screenId: 'example.ListScreen',
125
+          //         title: 'Tab3',
126
+          //         passProps: {
127
+          //           str: 'This is a prop passed to Tab3'
128
+          //         }
129
+          //       }
130
+          //     ],
131
+          //     navigatorStyle: {}
132
+          //   },
133
+          //   drawer: { // optional, add this if you want a side menu drawer in your app
134
+          //     left: { // optional, define if you want a drawer from the left
135
+          //       screen: 'example.SideMenu' // unique ID registered with Navigation.registerScreen
136
+          //     },
137
+          //     disableOpenGesture: false // optional, can the drawer be opened with a swipe instead of button
138
+          //   }
139
+          // });
109 140
         }
110 141
         return;
111 142
       case 'after-login':