-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.js
More file actions
27 lines (22 loc) · 767 Bytes
/
Copy pathindex.js
File metadata and controls
27 lines (22 loc) · 767 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
import 'react-native-gesture-handler'
import './src/localization/i18n'
import { AppRegistry, LogBox } from 'react-native'
import { name as appName } from './app.json'
import { Starter } from './src/starter'
const IGNORED_LOGS = ['Warning: Function components cannot be given refs']
LogBox.ignoreLogs(IGNORED_LOGS)
if (__DEV__) {
const withoutIgnored =
logger =>
(...args) => {
const output = args.join(' ')
if (!IGNORED_LOGS.some(log => output.includes(log))) {
logger(...args)
}
}
console.log = withoutIgnored(console.log)
console.info = withoutIgnored(console.info)
console.warn = withoutIgnored(console.warn)
console.error = withoutIgnored(console.error)
}
AppRegistry.registerComponent(appName, () => Starter)