Skip to content

Commit 11d2687

Browse files
author
Jacob Wenger
committed
Merge pull request #88 from jaylandro/master
Update app.js
2 parents df2e999 + 792dad6 commit 11d2687

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/commentsBox/js/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ var CommentList = React.createClass({
2828

2929

3030
var CommentForm = React.createClass({
31-
handleSubmit: function() {
31+
handleSubmit: function(event) {
32+
event.preventDefault();
3233
var author = this.refs.author.getDOMNode().value.trim();
3334
var text = this.refs.text.getDOMNode().value.trim();
3435
this.props.onCommentSubmit({author: author, text: text});
3536
this.refs.author.getDOMNode().value = '';
3637
this.refs.text.getDOMNode().value = '';
37-
return false;
3838
},
3939

4040
render: function() {

0 commit comments

Comments
 (0)