Skip to content

Commit d83bc77

Browse files
committed
Update app.js
Passed in the click event for preventDefault on handleSubmit
1 parent 8a9323a commit d83bc77

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,8 +28,8 @@ var CommentList = React.createClass({
2828

2929

3030
var CommentForm = React.createClass({
31-
handleSubmit: function() {
32-
event.preventDefault();
31+
handleSubmit: function(e) {
32+
e.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});

0 commit comments

Comments
 (0)