-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex2.js
58 lines (46 loc) · 1.38 KB
/
index2.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
46
47
48
49
50
51
52
53
54
55
56
57
// //.....React fetch blogs......................
// console.log('Kabayeee')
// const BlogList = () => {
// const [blogs, setBlogs] = React.useState([]);
// React.useEffect(() => {
// console.log("Fetching blogs...");
// fetch("https://personal-web-backend-318j.onrender.com/api/blogs/")
// .then(response => response.json())
// .then(data => {
// console.log("Blogs data:", data);
// setBlogs(data.blogs);
// })
// .catch(error => {
// console.error('Error fetching blogs:', error);
// });
// }, []);
// console.log("Rendered blogs:", blogs);
// return (
// <div>
// {blogs.length > 0 ? (
// blogs.map(blog => (
// <div key={blog._id} className="blog">
// <img src={blog.image} alt={blog.title} />
// <h2>{blog.title}</h2>
// <p>{blog.content}</p>
// <p>{blog.date}</p>
// <p>{blog.likes} Likes</p>
// <p>Comments</p>
// <a href={`blog/${blog._id}`}>Learn More</a>
// </div>
// ))
// ) : (
// <h1>No Blogs Found</h1>
// )}
// </div>
// );
// };
// ReactDOM.render(
// <BlogList />, document.getElementById('blogsBox')
// );
import React from 'react';
import {Text} from 'react-native';
const Cat = () => {
return <Text>Hello, I am your cat!</Text>;
};
export default Cat;