From 3746e054fb1d4b475394fe9228db00ceaf50386b Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Wed, 6 Jun 2018 11:08:29 -0400 Subject: [PATCH] Update CommentsRedux2.md --- CommentsRedux2.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CommentsRedux2.md b/CommentsRedux2.md index 655dd5b..c39950e 100755 --- a/CommentsRedux2.md +++ b/CommentsRedux2.md @@ -67,6 +67,20 @@ export default VisibleCommentsList; 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: +```javascript +class CommentsList extends React.Component { + render(){ + return + } +} +``` + ## Map a Dispatch ADD Action to a CommentsForm Component property Import `connect` component from `react-redux` into `js/components/commentsForm.jsx`: