Update CommentsRedux.md

master
Matt Huntington 8 years ago committed by GitHub
parent c3141a475c
commit 8139e46c11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -73,7 +73,7 @@ In the handleSubmit function, dispatch an `ADD` action:
```javascript ```javascript
handleSubmit(event){ handleSubmit(event){
event.preventDefault(); event.preventDefault();
this.props.handleSubmit({ this.props.createComment({
body: this.refs.body.value, body: this.refs.body.value,
author: this.refs.author.value author: this.refs.author.value
}); });
@ -142,7 +142,7 @@ class Comments extends React.Component {
} }
``` ```
`js/components/commentsform.jsx` no long needs to call `this.props.handleSubmit`: `js/components/commentsform.jsx` no long needs to call `this.props.createComment`:
```javascript ```javascript
handleSubmit(event){ handleSubmit(event){

Loading…
Cancel
Save