<body> <div id="content"> </div> <script type="text/babel"> // tutorial1.js var CommentBox = React.createClass({ render: function() { return ( <div className="commentBox"> Hello, world! I am a CommentBox. <h1>Comments</h1> <CommentList /> <CommentForm /> </div> ); } }); var CommentList = React.createClass({ render: function() { return ( <div className="commentList"> Hello, world! I am a CommentList. <Comment author="Pete Hunt" >This is one comment</Comment> <Comment author="Jordan Walke">This is *another* comment</Comment> </div> ); } }); var CommentForm = React.createClass({ render: function() { return ( <div className="commentForm"> Hello, world! I am a CommentForm. </div> ); } }); // tutorial4.js var Comment = React.createClass({ render: function() { return ( <div className="comment"> <h2 className="commentAuthor"> {this.props.author} </h2> {this.props.children} </div> ); } }); ReactDOM.render( <CommentBox />, document.getElementById('content') ); </script> </body>