I never knew that I can use the function inside its declaration. I would like to know more about it. Does it have some term in JS docs?
const childNodes = (child) => {
return child.map((childNode) => (
<div>
<div> {childNode.title} </div>
{/* ??? */}
{childNodes(childNode.children)}
</div>
));
};