-
Notifications
You must be signed in to change notification settings - Fork 289
/
App.js
38 lines (32 loc) · 977 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
34
35
36
37
38
/**
* Airbnb Clone App
* @author: Andy
* @Url: https://www.cubui.com
*/
import React, { Component } from 'react';
import { StatusBar, AppRegistry } from 'react-native';
import { Provider } from 'react-redux';
import { ApolloProvider } from 'react-apollo';
import { ApolloClient } from 'apollo-client';
import { HttpLink } from 'apollo-link-http';
import { InMemoryCache } from 'apollo-cache-inmemory';
import { Root, configureStore} from './src/navigators/AppNavigator';
import { NETWORK_INTERFACE } from './src/config';
StatusBar.setBarStyle('light-content', true);
const client = new ApolloClient({
link: new HttpLink({ uri: NETWORK_INTERFACE }),
cache: new InMemoryCache()
})
class App extends Component {
render() {
return (
<Provider store={configureStore({})}>
<ApolloProvider client={client}>
<Root />
</ApolloProvider>
</Provider>
);
}
}
AppRegistry.registerComponent('App', () => App);
export default App;