Update Comments.md

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

@ -238,7 +238,7 @@ In `js/components/comments.jsx` create a property on the CommentsForm element ca
render(){ render(){
return <section> return <section>
<CommentsList comments={this.state.comments}></CommentsList> <CommentsList comments={this.state.comments}></CommentsList>
<CommentsForm handleSubmit={this.addComment}></CommentsForm> <CommentsForm createComment={this.addComment}></CommentsForm>
</section> </section>
} }
``` ```
@ -293,7 +293,7 @@ Now call the `handleSubmit` function that was passed into the CommentsForm compo
```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
}); });

Loading…
Cancel
Save