-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.android.js
More file actions
57 lines (48 loc) · 1.25 KB
/
index.android.js
File metadata and controls
57 lines (48 loc) · 1.25 KB
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
51
52
53
54
55
56
57
'use strict';
import React from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
NativeModules,
} from 'react-native';
import { DeviceEventEmitter } from 'react-native';
var RCTToastAndroid = NativeModules.ToastCustomModule;
class HelloWorld extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<View>
<Text> { this.props.message }</Text>
<Text style={styles.hello}> The instructions are a bit different depending on your development operating system, and whether you want to start developing for iOS or Android.
If you want to develop for both iOS and
Android,
with, since the setup is a bit different. </Text>
</View>
)
}
componentDidMount()
{
RCTToastAndroid.showMessage('Awesome', (result) => {
// console.warn(result);
});
DeviceEventEmitter.addListener('qrCode', function(e: Event) {
// console.warn('qrCode : ',e);
});
}
}
var styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
},
hello: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
});
AppRegistry.registerComponent('HelloWorld', () => HelloWorld);