-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
112 lines (100 loc) · 2.84 KB
/
Copy pathApp.js
File metadata and controls
112 lines (100 loc) · 2.84 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
// import React from 'react';
// import { PostDetailedView } from './PostDetailedView';
import 'react-native-gesture-handler';
import {Router} from './routes'
export default Router;
// import {
// View,
// Text,
// ScrollView,
// StyleSheet,
// TouchableOpacity,
// FlatList,
// } from 'react-native';
// export class App extends React.Component {
// constructor(props) {
// super(props);
// this.state = {
// posts: [],
// };
// }
// componentDidMount(){
// this.fetchData();
// }
// fetchData = async ()=>{
// fetch('https://jsonplaceholder.typicode.com/posts')
// .then((response) => response.json())
// .then((responseJson) => {
// this.setState({
// posts: responseJson,
// });
// });
// }
// renderItem = ({item}) => {
// // function HomeScreen({ navigation }) {
// return (
// <View>
// <TouchableOpacity style={styles.MainContainer}
// onPress={() => this.props.navigation.navigate('Details')}>
// <View style={styles.txtColumn}>
// <Text
// style={{
// paddingBottom: '4%',
// fontSize: 21,
// fontWeight: 'bold',
// }}>
// {item.title}
// </Text>
// <Text style={{fontSize: 15}}>{item.body} </Text>
// <Text />
// </View>
// <View
// style={{
// borderBottomColor: 'black',
// borderBottomWidth: 2,
// }}/>
// </TouchableOpacity>
// </View>
// );
// // }
// return (
// <NavigationContainer>
// <Stack.Navigator initialRouteName="">
// <Stack.Screen name="Home" component={HomeScreen} />
// <Stack.Screen name="Details" component={DetailsScreen} />
// </Stack.Navigator>
// </NavigationContainer>
// );
// function DetailsScreen() {
// return (
// <View style={styles.txtColumn}>
// <Text
// style={{
// paddingBottom: '4%',
// fontSize: 21,
// fontWeight: 'bold',
// }}>
// {item.title}
// </Text>
// <Text style={{ fontSize: 15 }}>{item.body} </Text>
// </View>
// );
// }
// };
// render() {
// let {posts} = this.state;
// return (
// <ScrollView>
// <View>
// <Text style={styles.name}>Hatch Blog</Text>
// <FlatList
// data={posts}
// renderItem={this.renderItem}
// keyExtractor={(item, index) => index.toString()}
// />
// </View>
// </ScrollView>
// );
// }
// }
// export default App;