|
|
|
|
|
by thatswrong0
1576 days ago
|
|
'apple' and 'slicedApple' would more likely be strings / objects / arrays in the real world. Maybe this still woefully contrived version is clearer? function FacebookComment({ commentId }) {
const comment = useGetComment(commentId);
const likes = useGetLikes(comment);
return (
<div>
<span>{comment.text}</span>
<span>{likes.length} likes</span>
</div>
);
}
I don't think deal with more braces right now to bring the alternative into existence unfortunately |
|