4. コンポーネントベース - CommentBox - Comment var Comment = React.createClass({ <div>comment</div> }); var CommentBox = React.createClass({ render: function() { return ( <div className="commentBox"> <h1>Comments</h1> <Comment /> </div> ); } }); ReactDOM.render( React.createElement(CommentBox, null), document.getElementById('content') ); コンポーネントにDOMを 定義し、コンポーネントを 組み合わせる。 コンポーネントの定義に従 い、DOMが生成される。 5. props v