Daniel Zlotin 8 年前
父节点
当前提交
6a3d1436a6
共有 3 个文件被更改,包括 10 次插入10 次删除
  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 查看文件

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

+ 1
- 1
src/Navigation.js 查看文件

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

+ 4
- 4
src/platformSpecific.android.js 查看文件

@@ -7,18 +7,18 @@ import utils from './utils';
7 7
 const resolveAssetSource = require('react-native/Libraries/Image/resolveAssetSource');
8 8
 
9 9
 function startSingleScreenApp(params) {
10
-  let screen = params.screen;
10
+  const screen = params.screen;
11 11
   if (!screen.screen) {
12 12
     console.error('startSingleScreenApp(params): screen must include a screen property');
13 13
     return;
14 14
   }
15
-
16 15
   addNavigatorParams(screen);
17 16
   addNavigatorButtons(screen);
18 17
   addNavigationStyleParams(screen);
19 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 24
 function startTabBasedApp(params) {