in case you need an example that needs to go unknown levels deep i solved with this
function Comment({text, author}){
return {author}: {text}
}
CommentTree(comments) {
let items = comments.map((comment) => {
return (
{comment.children && CommentTree(comment.children)}
)
})
return items
}