File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 5
5
< title > React Tutorial</ title >
6
6
<!-- Not present in the tutorial. Just for basic styling. -->
7
7
< 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 >
9
10
< script src ="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.6.15/browser.js "> </ script >
10
11
< script src ="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js "> </ script >
11
12
< script src ="https://cdnjs.cloudflare.com/ajax/libs/marked/0.3.2/marked.min.js "> </ script >
Original file line number Diff line number Diff line change @@ -100,14 +100,14 @@ var CommentList = React.createClass({
100
100
var CommentForm = React . createClass ( {
101
101
handleSubmit : function ( e ) {
102
102
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 ( ) ;
105
105
if ( ! text || ! author ) {
106
106
return ;
107
107
}
108
108
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 = '' ;
111
111
} ,
112
112
render : function ( ) {
113
113
return (
@@ -120,7 +120,7 @@ var CommentForm = React.createClass({
120
120
}
121
121
} ) ;
122
122
123
- React . render (
123
+ ReactDOM . render (
124
124
< CommentBox url = "/api/comments" pollInterval = { 2000 } /> ,
125
125
document . getElementById ( 'content' )
126
126
) ;
You can’t perform that action at this time.
0 commit comments