📅  最后修改于: 2022-03-11 15:01:41.461000             🧑  作者: Mango
const RecursiveComponent = ({ name, items }) => {
const hasChildren = items && items.length
return (
<>
{name}
{hasChildren && items.map((item) => (
))}
>
)
}