-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
29 lines (24 loc) · 724 Bytes
/
Copy pathApp.js
File metadata and controls
29 lines (24 loc) · 724 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
import 'react-native-gesture-handler';
import React, {useEffect, Fragment} from 'react';
import Toast from 'react-native-toast-message';
import * as NavigationService from 'react-navigation-helpers';
import RNBootSplash from 'react-native-bootsplash';
import RootNavigator from './src/navigators';
const App = () => {
useEffect(() => {
const init = async () => {
// …do multiple sync or async tasks
};
init().finally(async () => {
await RNBootSplash.hide({fade: true});
console.log('Bootsplash has been hidden successfully');
});
}, []);
return (
<Fragment>
<RootNavigator />
<Toast ref={ref => Toast.setRef(ref)} />
</Fragment>
);
};
export default App;