-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathApp.js
33 lines (29 loc) · 769 Bytes
/
App.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
import React, { Component } from 'react';
import {
ActivityIndicator,
} from 'react-native';
import { PersistGate } from 'redux-persist/es/integration/react';
import { Provider } from 'react-redux';
import Login from './src/Login';
import configureStore from './src/store';
const { persistor, store } = configureStore();
const onBeforeLift = () => {
// take some action before the gate lifts
}
export default class App extends Component {
// componentDidMount(){
// persistor.purge();
// }
render() {
return (
<Provider store={store}>
<PersistGate
loading={<ActivityIndicator />}
onBeforeLift={onBeforeLift}
persistor={persistor}>
<Login/>
</PersistGate>
</Provider>
);
}
}