فهرست منبع

Listing 2: Composing components: adding CommentList, CommentForm.

Frederic G. MARAND 8 سال پیش
والد
کامیت
039b8299fc
1فایلهای تغییر یافته به همراه20 افزوده شده و 0 حذف شده
  1. 20 0
      public/scripts/tutorial.js

+ 20 - 0
public/scripts/tutorial.js

@@ -1,3 +1,23 @@
+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 (