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