Update app.js

Passed in the click event for preventDefault on handleSubmit
This commit is contained in:
Jay Landro
2016-04-08 16:43:45 -05:00
parent 8a9323a5d3
commit d83bc77940

View File

@@ -28,8 +28,8 @@ var CommentList = React.createClass({
var CommentForm = React.createClass({
handleSubmit: function() {
event.preventDefault();
handleSubmit: function(e) {
e.preventDefault();
var author = this.refs.author.getDOMNode().value.trim();
var text = this.refs.text.getDOMNode().value.trim();
this.props.onCommentSubmit({author: author, text: text});