1function app() {
2 return (
3 <div>
4 <h1>Hello World</h1>;
5 </div>
6 );
7}
1function Comment(props) {
2 return (
3 <div className="Comment">
4 <div className="UserInfo">
5 <img className="Avatar"
6 src={props.author.avatarUrl}
7 alt={props.author.name}
8 />
9 <div className="UserInfo-name">
10 {props.author.name}
11 </div>
12 </div>
13 <div className="Comment-text">
14 {props.text}
15 </div>
16 <div className="Comment-date">
17 {formatDate(props.date)}
18 </div>
19 </div>
20 );
21}