Guest User

Untitled

a guest
Nov 20th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. import React from 'react';
  2.  
  3. import CommentItem from "./CommentItem";
  4. import NewComments from "./NewComments";
  5.  
  6. class AddComments extends React.Component{
  7.  
  8. render(){
  9.  
  10. return(
  11. <>
  12. <NewComments cSub={this.props.cSub}/>
  13. {this.props.commentData.comments.map((commentData, index) => (
  14. <CommentItem
  15. key={commentData.Id || index}
  16. name={commentData.name}
  17. comment={commentData.comment}
  18. likecount={commentData.likes}
  19. trash={commentData.trash}
  20. />
  21.  
  22. ))
  23. }
  24. </>
  25. )
  26. }
  27. }
  28. export default AddComments;
Add Comment
Please, Sign In to add comment