-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathApp.js
45 lines (43 loc) · 1.06 KB
/
App.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
import React, { Component } from 'react';
import { StyleSheet, View, FlatList } from 'react-native';
import RNUrlPreview from "react-native-url-preview";
export default class App extends Component<Props> {
renderItem = ({ item }) => {
return(
<RNUrlPreview text={item} />
)
}
render() {
return (
<View style={styles.container}>
<FlatList
style={{
width: '100%'
}}
data={[
"https://reactnativeforyou.com/how-to-show-url-previews-in-react-native/",
"Myrath dance https://medium.com/s/user-friendly/emulation-is-not-a-product-strategy-cfecdbffce96",
]}
renderItem={this.renderItem}
ItemSeparatorComponent={
() => (
<View
style={{
height: 10
}}
/>
)
}
/>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
}
});