Skip to content

Commit a52792b

Browse files
committed
Update for 0.14
Fixes reactjs#83
1 parent 6647f84 commit a52792b

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

public/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
<title>React Tutorial</title>
66
<!-- Not present in the tutorial. Just for basic styling. -->
77
<link rel="stylesheet" href="css/base.css" />
8-
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.13.0/react.js"></script>
8+
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.0/react.js"></script>
9+
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.0/react-dom.js"></script>
910
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.6.15/browser.js"></script>
1011
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
1112
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.3.2/marked.min.js"></script>

public/scripts/example.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,14 @@ var CommentList = React.createClass({
100100
var CommentForm = React.createClass({
101101
handleSubmit: function(e) {
102102
e.preventDefault();
103-
var author = React.findDOMNode(this.refs.author).value.trim();
104-
var text = React.findDOMNode(this.refs.text).value.trim();
103+
var author = this.refs.author.value.trim();
104+
var text = this.refs.text.value.trim();
105105
if (!text || !author) {
106106
return;
107107
}
108108
this.props.onCommentSubmit({author: author, text: text});
109-
React.findDOMNode(this.refs.author).value = '';
110-
React.findDOMNode(this.refs.text).value = '';
109+
this.refs.author.value = '';
110+
this.refs.text.value = '';
111111
},
112112
render: function() {
113113
return (
@@ -120,7 +120,7 @@ var CommentForm = React.createClass({
120120
}
121121
});
122122

123-
React.render(
123+
ReactDOM.render(
124124
<CommentBox url="/api/comments" pollInterval={2000} />,
125125
document.getElementById('content')
126126
);

0 commit comments

Comments
 (0)