File tree Expand file tree Collapse file tree 3 files changed +16
-13
lines changed Expand file tree Collapse file tree 3 files changed +16
-13
lines changed Original file line number Diff line number Diff line change 1
1
import '../styles/base.css' ;
2
- import React from 'react/addons' ;
2
+ import React from 'react' ;
3
+ import ReactDOM from 'react-dom' ;
3
4
4
5
let Hello = React . createClass ( {
5
6
render ( ) {
@@ -9,4 +10,4 @@ let Hello = React.createClass({
9
10
}
10
11
} ) ;
11
12
12
- React . render ( < Hello name = 'World' /> , document . body ) ;
13
+ ReactDOM . render ( < Hello name = 'World' /> , document . getElementById ( 'root' ) ) ;
Original file line number Diff line number Diff line change 12
12
"author" : " " ,
13
13
"license" : " ISC" ,
14
14
"dependencies" : {
15
- "babel-core" : " ^5.8.25" ,
16
- "babel-loader" : " ^5.3.2" ,
17
- "css-loader" : " ^0.19.0" ,
18
- "express" : " ^4.13.3" ,
19
- "file-loader" : " ^0.8.4" ,
20
- "jsx-loader" : " ^0.13.2" ,
21
- "react" : " ^0.13.3" ,
22
- "style-loader" : " ^0.12.4" ,
23
- "webpack" : " ^1.12.2"
15
+ "express" : " ^4.13.4" ,
16
+ "react" : " ^0.14.6" ,
17
+ "react-dom" : " ^0.14.6"
24
18
},
25
19
"devDependencies" : {
20
+ "babel-core" : " ^5.8.35" ,
21
+ "babel-loader" : " ^5.4.0" ,
22
+ "css-loader" : " ^0.23.1" ,
23
+ "jsx-loader" : " ^0.13.2" ,
26
24
"react-hot-loader" : " ^1.3.0" ,
27
- "webpack-dev-server" : " ^1.11.0"
25
+ "style-loader" : " ^0.13.0" ,
26
+ "webpack" : " ^1.12.12" ,
27
+ "webpack-dev-server" : " ^1.14.1"
28
28
}
29
29
}
Original file line number Diff line number Diff line change 6
6
< script src ="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js "> </ script >
7
7
< title > Node + React</ title >
8
8
</ head >
9
- < body > </ body >
9
+ < body >
10
+ < div id ='root '/>
11
+ </ body >
10
12
< script src ="app.js "> </ script >
11
13
</ html >
You can’t perform that action at this time.
0 commit comments