-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
33 lines (29 loc) · 669 Bytes
/
App.js
File metadata and controls
33 lines (29 loc) · 669 Bytes
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 from 'react';
import { Provider } from 'react-redux';
import { AppLoading } from 'expo';
import { RootStack, Tabs } from './config/router';
import Store from './Store';
export default class App extends React.Component {
state = {
isReady: false,
};
async _cacheResourcesAsync() {
return true;
}
render() {
if (!this.state.isReady) {
return (
<AppLoading
startAsync={this._cacheResourcesAsync}
onFinish={() => this.setState({ isReady: true })}
onError={console.warn}
/>
);
}
return (
<Provider store={Store}>
<Tabs />
</Provider>
);
}
}