Daniel Zlotin 8 years ago
parent
commit
6a3d1436a6
3 changed files with 10 additions and 10 deletions
  1. 5
    5
      example-redux/src/app.js
  2. 1
    1
      src/Navigation.js
  3. 4
    4
      src/platformSpecific.android.js

+ 5
- 5
example-redux/src/app.js View File

1
-import { createStore, applyMiddleware, combineReducers } from 'redux';
2
-import { Provider } from 'react-redux';
3
-import { Navigation } from 'react-native-navigation';
1
+import {createStore, applyMiddleware, combineReducers} from 'redux';
2
+import {Provider} from 'react-redux';
3
+import {Navigation} from 'react-native-navigation';
4
 import thunk from 'redux-thunk';
4
 import thunk from 'redux-thunk';
5
 import * as reducers from './reducers';
5
 import * as reducers from './reducers';
6
 import * as appActions from './reducers/app/actions';
6
 import * as appActions from './reducers/app/actions';
11
 const store = createStoreWithMiddleware(reducer);
11
 const store = createStoreWithMiddleware(reducer);
12
 
12
 
13
 // screen related book keeping
13
 // screen related book keeping
14
-import { registerScreens } from './screens';
14
+import {registerScreens} from './screens';
15
 registerScreens(store, Provider);
15
 registerScreens(store, Provider);
16
 
16
 
17
 // notice that this is just a simple class, it's not a React component
17
 // notice that this is just a simple class, it's not a React component
23
   }
23
   }
24
 
24
 
25
   onStoreUpdate() {
25
   onStoreUpdate() {
26
-    const { root } = store.getState().app;
26
+    const {root} = store.getState().app;
27
     // handle a root change
27
     // handle a root change
28
     // if your app doesn't change roots in runtime, you can remove onStoreUpdate() altogether
28
     // if your app doesn't change roots in runtime, you can remove onStoreUpdate() altogether
29
     if (this.currentRoot != root) {
29
     if (this.currentRoot != root) {

+ 1
- 1
src/Navigation.js View File

93
   return platformSpecific.dismissInAppNotification(params);
93
   return platformSpecific.dismissInAppNotification(params);
94
 }
94
 }
95
 
95
 
96
-module.exports = {
96
+export default {
97
   registerScreen,
97
   registerScreen,
98
   getRegisteredScreen,
98
   getRegisteredScreen,
99
   registerComponent,
99
   registerComponent,

+ 4
- 4
src/platformSpecific.android.js View File

7
 const resolveAssetSource = require('react-native/Libraries/Image/resolveAssetSource');
7
 const resolveAssetSource = require('react-native/Libraries/Image/resolveAssetSource');
8
 
8
 
9
 function startSingleScreenApp(params) {
9
 function startSingleScreenApp(params) {
10
-  let screen = params.screen;
10
+  const screen = params.screen;
11
   if (!screen.screen) {
11
   if (!screen.screen) {
12
     console.error('startSingleScreenApp(params): screen must include a screen property');
12
     console.error('startSingleScreenApp(params): screen must include a screen property');
13
     return;
13
     return;
14
   }
14
   }
15
-
16
   addNavigatorParams(screen);
15
   addNavigatorParams(screen);
17
   addNavigatorButtons(screen);
16
   addNavigatorButtons(screen);
18
   addNavigationStyleParams(screen);
17
   addNavigationStyleParams(screen);
19
   screen.passProps = params.passProps;
18
   screen.passProps = params.passProps;
20
-  const drawer = setupDrawer(params.drawer);
21
-  //NativeModules.NavigationReactModule.startApp(screen, drawer);
19
+  //const drawer = setupDrawer(params.drawer);
20
+
21
+  NativeModules.NavigationReactModule.startApp(screen);
22
 }
22
 }
23
 
23
 
24
 function startTabBasedApp(params) {
24
 function startTabBasedApp(params) {