Created
October 23, 2018 22:12
-
-
Save dcalixto/8112eac4f516764a28a24ad084f7e4a0 to your computer and use it in GitHub Desktop.
Revisions
-
dcalixto created this gist
Oct 23, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ import React, { Component } from "react"; import Comment from "./comment"; class Comments extends Component { constructor(props) { super(props); this.state = { comments: [] }; } render() { let { comments, replies } = this.props; comments = comments.map(comment => { return <Comment comment={comment} key={comment.id} />; }); return ( <table className="table table-striped"> <tbody>{comments}</tbody> </table> ); } } export default Comments;