File tree Expand file tree Collapse file tree 2 files changed +40
-1
lines changed Expand file tree Collapse file tree 2 files changed +40
-1
lines changed Original file line number Diff line number Diff line change 14
14
< body >
15
15
< div id ="content "> </ div >
16
16
<!--<script type="text/babel" src="scripts/example.js"></script>-->
17
- < script type ="text/babel " src ="scripts/tutorial1.js "> </ script >
17
+ <!--<script type="text/babel" src="scripts/tutorial1.js"></script>-->
18
+ < script type ="text/babel " src ="scripts/tutorial2-3.js "> </ script >
18
19
</ body >
19
20
</ html >
Original file line number Diff line number Diff line change
1
+ /* global React, ReactDOM */
2
+
3
+ var CommentList = React . createClass ( {
4
+ render : function ( ) {
5
+ return (
6
+ < div className = "commentList" >
7
+ Hello, world! I am a CommentList.
8
+ </ div >
9
+ ) ;
10
+ }
11
+ } ) ;
12
+
13
+ var CommentForm = React . createClass ( {
14
+ render : function ( ) {
15
+ return (
16
+ < div className = "commentForm" >
17
+ Hello, world! I am a CommentForm.
18
+ </ div >
19
+ ) ;
20
+ }
21
+ } ) ;
22
+
23
+ var CommentBox = React . createClass ( {
24
+ render : function ( ) {
25
+ return (
26
+ < div className = "commentBox" >
27
+ < h1 > Comments</ h1 >
28
+ < CommentList />
29
+ < CommentForm />
30
+ </ div >
31
+ ) ;
32
+ }
33
+ } ) ;
34
+
35
+ ReactDOM . render (
36
+ < CommentBox /> ,
37
+ document . getElementById ( 'content' )
38
+ ) ;
You can’t perform that action at this time.
0 commit comments