const block = {
"author": {
"url": "/",
"name": "Nikulio"
},
"text": "Hello, bEAtch",
"date": "Recently"
}
function Comment(props) {
return (
<div className="Comment">
<UserInfo user={props.author}/>
<div className="Comment-text">
{props.text}
</div>
</div>
);
}
function UserInfo(props) {
return (
<div className="UserInfo">
<Avatar user={props.user}/>
<div className="UserInfo-name">
{props.user.name}
</div>
</div>
);
}
function Avatar(props) {
return (
<img className="Avatar"
src={props.user.url}
alt={props.user.name}
/>
)
}
<Avatar user={props.user}/>
{
"url": "/",
"name": "Nikulio"
}
{
user: {
url...
name....
}
}