-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
36 lines (31 loc) · 804 Bytes
/
index.js
File metadata and controls
36 lines (31 loc) · 804 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
35
36
/**
* @format
*/
import 'react-native-gesture-handler';
import 'react-native-reanimated';
import { AppRegistry } from 'react-native';
import { name as appName } from './app.json';
import { App } from '@/app';
import { setErrorReporter } from '@/lib/error/reporting';
if (__DEV__) {
require('./src/devtools/reactotron');
}
setErrorReporter((error, context) => {
if (__DEV__) {
console.error('[GlobalErrorReporter]', {
name: error.name,
message: error.message,
stack: error.stack,
context,
});
return;
}
// TODO: wire Sentry here.
// Sentry.captureException(error, { extra: context });
console.error('[GlobalErrorReporter]', {
name: error.name,
message: error.message,
context,
});
});
AppRegistry.registerComponent(appName, () => App);