Skip to content

Commit

Permalink
Merge pull request reactjs#43 from brunocoelho/tutorial-improvement
Browse files Browse the repository at this point in the history
Remove deprecated method
  • Loading branch information
zpao committed Apr 1, 2015
2 parents 58f6fc2 + 160de38 commit cbe73b7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions public/scripts/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ var CommentList = React.createClass({
var CommentForm = React.createClass({
handleSubmit: function(e) {
e.preventDefault();
var author = this.refs.author.getDOMNode().value.trim();
var text = this.refs.text.getDOMNode().value.trim();
var author = React.findDOMNode(this.refs.author).value.trim();
var text = React.findDOMNode(this.refs.text).value.trim();
if (!text || !author) {
return;
}
this.props.onCommentSubmit({author: author, text: text});
this.refs.author.getDOMNode().value = '';
this.refs.text.getDOMNode().value = '';
React.findDOMNode(this.refs.author).value = '';
React.findDOMNode(this.refs.text).value = '';
},
render: function() {
return (
Expand Down

0 comments on commit cbe73b7

Please sign in to comment.