Sfoglia il codice sorgente

Listing 3: composing components: composing CommentBox of CommentList and CommentForm.

Frederic G. MARAND 8 anni fa
parent
commit
257f06693e
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      public/scripts/tutorial.js

+ 3 - 1
public/scripts/tutorial.js

@@ -22,7 +22,9 @@ let CommentBox = React.createClass({
   render: function () {
     return (
       <div className="commentBox">
-        Hello, world: I am a CommentBox.
+        <h1>Comments</h1>
+        <CommentList />
+        <CommentForm />
         </div>
     );
   }