From 0a6e6a66dff900138e74bcc399cd0b0ec442557d Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Wed, 13 Jun 2018 13:30:27 -0400 Subject: [PATCH] Update CommentsRedux2.md --- CommentsRedux2.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CommentsRedux2.md b/CommentsRedux2.md index 2c386c2..280dd51 100755 --- a/CommentsRedux2.md +++ b/CommentsRedux2.md @@ -54,7 +54,7 @@ const mapStateToProps = function(state){ In `js/components/commentslist.jsx` connect the mapper with the component: ```javascript -const VisibleCommentsList = connect( +const ConnectedComponent = connect( mapStateToProps )(CommentsList); ``` @@ -62,7 +62,7 @@ const VisibleCommentsList = connect( In `js/components/commentslist.jsx`, export `VisibleCommentsList`: ```javascript -export default VisibleCommentsList; +export default ConnectedComponent; ``` You can now remove the `constructor`/`componentDidMount` functions and change `this.state.comments.map` to `this.props.comments.map`. We're back to using props instead of component state: