|
@@ -7,6 +7,7 @@
|
7
|
7
|
|
8
|
8
|
import React, { Component } from 'react';
|
9
|
9
|
import { Platform, StyleSheet, Text, View } from 'react-native';
|
|
10
|
+import { WebView } from 'react-native-webview'
|
10
|
11
|
|
11
|
12
|
const instructions = Platform.select({
|
12
|
13
|
ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
|
|
@@ -20,8 +21,11 @@ export default class App extends Component {
|
20
|
21
|
return (
|
21
|
22
|
<View testID="welcome" style={styles.container}>
|
22
|
23
|
<Text style={styles.welcome}>Welcome to React Native!</Text>
|
23
|
|
- <Text style={styles.instructions}>To get started, edit App.js</Text>
|
24
|
|
- <Text style={styles.instructions}>{instructions}</Text>
|
|
24
|
+ <WebView
|
|
25
|
+ testID="testWebView"
|
|
26
|
+ style={styles.webview}
|
|
27
|
+ src={{ uri: "https://www.facebook.com/Engineering/" }}
|
|
28
|
+ />
|
25
|
29
|
</View>
|
26
|
30
|
);
|
27
|
31
|
}
|
|
@@ -39,9 +43,7 @@ const styles = StyleSheet.create({
|
39
|
43
|
textAlign: 'center',
|
40
|
44
|
margin: 10,
|
41
|
45
|
},
|
42
|
|
- instructions: {
|
43
|
|
- textAlign: 'center',
|
44
|
|
- color: '#333333',
|
|
46
|
+ webview: {
|
45
|
47
|
marginBottom: 5,
|
46
|
48
|
},
|
47
|
49
|
});
|