-
Notifications
You must be signed in to change notification settings - Fork 34
/
index.js
50 lines (42 loc) · 1.49 KB
/
index.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
39
40
41
42
43
44
45
46
47
48
49
50
import 'react-native-gesture-handler'; // fix ongesturehandler error
import 'react-native-image-keyboard';
import 'react-native-reanimated';
import './global';
import 'intl-pluralrules';
import { registerRootComponent } from 'expo';
// if (process.env.NODE_ENV === 'development') {
// const whyDidYouRender = require('@welldone-software/why-did-you-render');
// whyDidYouRender(React, {
// trackAllPureComponents: true,
// });
// }
import { LogBox } from 'react-native';
import App from './App';
import { enableFreeze } from 'react-native-screens';
import TrackPlayer, { Capability } from 'react-native-track-player';
LogBox.ignoreAllLogs();
LogBox.ignoreLogs([
'Module RCTSilentSwitch requires main queue setup since it overrides',
'Found screens with the same name nested inside one another',
'Possible Unhandled Promise Rejection',
'new NativeEventEmitter',
'You have passed a style',
'Non-serializable values were found in the navigation state',
'Easing was renamed',
'Require cycle: ',
]);
enableFreeze(true);
// // grab this text blob, and put it in a file named packager/modulePaths.js
// console.log(`module.exports = ${JSON.stringify(loadedModuleNames.sort())};`);
registerRootComponent(App);
TrackPlayer.registerPlaybackService(() => require('./service'));
TrackPlayer.setupPlayer().then(async () => {
await TrackPlayer.updateOptions({
capabilities: [
Capability.Play,
Capability.Pause,
Capability.SkipToNext,
Capability.SkipToPrevious,
],
});
});