-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.android.js
44 lines (36 loc) · 1.13 KB
/
index.android.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet
} from 'react-native';
import App from './app/App'
import { Provider } from 'react-redux/'
import {createStore, applyMiddleware} from 'redux'
import thunkMiddleware from 'redux-thunk'
import rootReducer from './app/reducers/index'
import {persistStore, autoRehydrate} from 'redux-persist'
var {AsyncStorage} = require('react-native');
const createStoreWithMiddleware = applyMiddleware(thunkMiddleware)(createStore);
const store = autoRehydrate()(createStoreWithMiddleware)(rootReducer);
// store.subscribe(() =>{
// console.log("store changed", store.getState())
// })
/**
* Main Screen for Android lands here, but we want both IOS and Android to show the same information.
* This will return the "App"
*/
export default class reactNativeIntro extends Component {
render() {
return (
<Provider store={store}>
<App />
</Provider>
);
}
}
AppRegistry.registerComponent('reactNativeIntro', () => reactNativeIntro);