From 98744c6ed600a74bbe98c61007e88766cab16ee6 Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Wed, 6 Jun 2018 14:40:29 -0400 Subject: [PATCH] Update CommentsRedux2.md --- CommentsRedux2.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CommentsRedux2.md b/CommentsRedux2.md index c39950e..2c386c2 100755 --- a/CommentsRedux2.md +++ b/CommentsRedux2.md @@ -94,7 +94,7 @@ Now create a function that will map a dispatch to a property in `js/components/c ```javascript const mapDispatchToProps = function(dispatch){ return { - handleSubmit: function(comment){ + createComment: function(comment){ dispatch({type:'ADD', comment: comment }); } } @@ -116,12 +116,12 @@ Export the `VisibleCommentsForm` component: export default VisibleCommentsForm; ``` -Refactor `handleSubmit` to use the `handleSubmit` component prop: +Refactor `handleSubmit` to use the `createComment` component prop: ```javascript handleSubmit(event){ event.preventDefault(); - this.props.handleSubmit({ + this.props.createComment({ body: this.refs.body.value, author: this.refs.author.value });