I am creating a website that scrapes data from different websites and display them on my website by rendering the text file data.
I know how to do it in React (see my code below), but I want to do it in HTML using simple javascript. Please suggest me what I should do?
renderComments({comments}){
if(comments != null){
const commentList=comments.map((comment)=>{
return(
<li key={comment.id}>
<p> {comment.detail}</p>
<p>--{comment.author}</p>
</li>
);
});
return(
<div className="col-12 col-md-5 m-1">
<h4>Comments</h4>
<ul className='list-unstyled'>
{commentList}
</ul>
</div>
);
}
}