-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
34 lines (30 loc) · 738 Bytes
/
App.js
File metadata and controls
34 lines (30 loc) · 738 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
34
import React, { Component } from 'react'
import { View, Text } from 'react-native'
import { ApolloProvider } from 'react-apollo'
import { Provider as PaperProvider } from 'react-native-paper'
import { app as StackRouter } from './re/App.bs'
import apolloClient from './apollo'
export default class App extends Component {
state = {
hasError: false,
}
componentDidCatch = () => {
this.setState({ hasError: true })
}
render() {
if (this.state.hasError) {
return (
<View>
<Text>Error!</Text>
</View>
)
}
return (
<PaperProvider>
<ApolloProvider client={apolloClient}>
<StackRouter />
</ApolloProvider>
</PaperProvider>
)
}
}