ENEI2019-Public/App/index.js

34 lines
665 B
JavaScript
Raw Normal View History

2019-01-08 19:09:50 +00:00
/** @format */
2019-01-30 14:32:25 +00:00
import React from 'react';
2019-02-22 23:38:34 +00:00
import {AppRegistry, View,Text} from 'react-native';
2019-01-30 14:32:25 +00:00
import {Provider} from 'react-redux';
2019-01-31 00:46:49 +00:00
2019-01-08 19:09:50 +00:00
import {name as appName} from './app.json';
2019-02-22 23:38:34 +00:00
import {PersistGate} from 'redux-persist/integration/react'
2019-01-31 00:46:49 +00:00
import App from './app/App' //Import the component file
2019-02-22 23:38:34 +00:00
import {store, persistor} from "./app/store/store";
rendeLoading=()=>{
<View>
<Text>loading........</Text>
</View>
}
2019-01-31 00:46:49 +00:00
const RNRedux = () => (
<Provider store={store}>
2019-02-22 23:38:34 +00:00
<PersistGate persistor={persistor} loading={this.rendeLoading()}>
<App />
</PersistGate>
2019-01-31 00:46:49 +00:00
</Provider>
);
2019-01-30 14:32:25 +00:00
2019-01-31 00:46:49 +00:00
AppRegistry.registerComponent(appName, () => RNRedux);
2019-01-30 14:32:25 +00:00