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

Commit b41efbe

Browse files
committed
export the connect method instead of Post component in Posts.js
1 parent 3fb32e3 commit b41efbe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/Posts.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import React, { Component } from "react";
2+
import { connect } from "react-redux";
3+
import { fetchPosts } from "../actions/postActions";
24

35
class Posts extends Component {
46
state = {
@@ -21,4 +23,4 @@ class Posts extends Component {
2123
}
2224
}
2325

24-
export default Posts;
26+
export default connect(null, { fetchPosts })(Posts);

0 commit comments

Comments
 (0)