|
@@ -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) {
|