Skip to content
This repository was archived by the owner on Jul 7, 2021. It is now read-only.

Commit 05314a8

Browse files
committed
remove the posts api call from Posts component as we moved it the postAction
1 parent d27f25c commit 05314a8

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/components/Posts.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ class Posts extends Component {
55
posts: [],
66
};
77

8-
componentDidMount() {
9-
fetch("https://jsonplaceholder.typicode.com/posts")
10-
.then((res) => res.json())
11-
.then((posts) => this.setState({ posts }));
12-
}
13-
148
render() {
159
const postItems = this.state.posts.map((post) => (
1610
<div key={post.id}>

0 commit comments

Comments
 (0)