ParseReact icon indicating copy to clipboard operation
ParseReact copied to clipboard

variable

Open kulikalov opened this issue 9 years ago • 1 comments

var CommentBlock = React.createClass({
  mixins: [ParseReact.Mixin], // Enable query subscriptions

  observe: function() {
    // Subscribe to all Comment objects, ordered by creation date
    // The results will be available at this.data.comments
    return {
      comments: (new Parse.Query('Comment')).ascending('createdAt')
    };
  },

  render: function() {
    // Render the text of each comment as a list item
    return (
      <ul>
        {this.data.comments.map(function(c) {
          return <li>{c.text}</li>;
        })}
      </ul>
    );
  }
});

how to make a variable equals to {c.text}?

kulikalov avatar Jun 10 '15 06:06 kulikalov