Skip to content

Commit 792dad6

Browse files
committed
Update app.js
Passed event into handleSubmit, removed return false.
1 parent d83bc77 commit 792dad6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

examples/commentsBox/js/app.js

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

2929

3030
var CommentForm = React.createClass({
31-
handleSubmit: function(e) {
32-
e.preventDefault();
31+
handleSubmit: function(event) {
32+
event.preventDefault();
3333
var author = this.refs.author.getDOMNode().value.trim();
3434
var text = this.refs.text.getDOMNode().value.trim();
3535
this.props.onCommentSubmit({author: author, text: text});
3636
this.refs.author.getDOMNode().value = '';
3737
this.refs.text.getDOMNode().value = '';
38-
return false;
3938
},
4039

4140
render: function() {

0 commit comments

Comments
 (0)