123456789101112131415161718192021222324252627282930313233343536 |
- let CommentList = React.createClass({
- render: function () {
- return (
- <div className="commentList">
- Hello, world! I am a CommentList.
- </div>
- );
- }
- });
- let CommentForm = React.createClass({
- render: function () {
- return (
- <div className="commentForm">
- Hello, world! I am a CommentForm.
- </div>
- );
- }
- });
- let CommentBox = React.createClass({
- render: function () {
- return (
- <div className="commentBox">
- <h1>Comments</h1>
- <CommentList />
- <CommentForm />
- </div>
- );
- }
- });
- ReactDOM.render(
- <CommentBox />,
- document.getElementById("content")
- );
|