-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathApp.js
More file actions
42 lines (34 loc) · 691 Bytes
/
App.js
File metadata and controls
42 lines (34 loc) · 691 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
37
38
39
40
41
42
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow
*/
import React, {Component} from 'react';
import {
View,
StyleSheet
} from 'react-native';
import { NativeModules } from 'react-native';
class App extends Component {
componentDidMount(){
var LoadingOverlay = NativeModules.LoadingOverlay;
//Let's show it
LoadingOverlay.toggle(true)
// And let's hide it after 3 seconds
setTimeout(()=>{
LoadingOverlay.toggle(false)
}, 3000)
}
render(){
return ( <View style={styles.background}></View>)
}
};
const styles = StyleSheet.create({
background: {
backgroundColor: '#6ce6cb',
flex: 1,
},
});
export default App