make a class component code example
Example: functional components react
function Comment(props) {
return (
{props.author.name}
{props.text}
{formatDate(props.date)}
);
}