Ver código fonte

Listing 8: Hook up the data model step1: data out of the component.

Frederic G. MARAND 8 anos atrás
pai
commit
88eb2bb7c9
1 arquivos alterados com 5 adições e 0 exclusões
  1. 5 0
      public/scripts/tutorial.js

+ 5 - 0
public/scripts/tutorial.js

@@ -1,3 +1,8 @@
+let data = [
+  { id: 1, author: "Pete Hunt", text: "This is one comment" },
+  { id: 2, author: "Jordan Walke", text: "This is *another* comment" }
+];
+
 let Comment = React.createClass({
   rawMarkup: function () {
     let rawMarkup = marked(this.props.children.toString(), { sanitize: true });