javascript
const CommentsList = () => {
const comments = ['DAM!', 'BAM!', 'RAM!'];
const Comment = ({ text }: { text: string }) => {
return <li>{text}</li>;
};
return (
<ul>
{comments.map((c, i) => (
<Comment key={i} text={c} />
))}
</ul>
);
};
This is a public paste that anyone can view.
Share