Skip to content

Commit 160de38

Browse files
committed
Remove deprecated method
1 parent 58f6fc2 commit 160de38

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

public/scripts/example.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,14 @@ var CommentList = React.createClass({
101101
var CommentForm = React.createClass({
102102
handleSubmit: function(e) {
103103
e.preventDefault();
104-
var author = this.refs.author.getDOMNode().value.trim();
105-
var text = this.refs.text.getDOMNode().value.trim();
104+
var author = React.findDOMNode(this.refs.author).value.trim();
105+
var text = React.findDOMNode(this.refs.text).value.trim();
106106
if (!text || !author) {
107107
return;
108108
}
109109
this.props.onCommentSubmit({author: author, text: text});
110-
this.refs.author.getDOMNode().value = '';
111-
this.refs.text.getDOMNode().value = '';
110+
React.findDOMNode(this.refs.author).value = '';
111+
React.findDOMNode(this.refs.text).value = '';
112112
},
113113
render: function() {
114114
return (

0 commit comments

Comments
 (0)