venus
venus2y ago

venus – 07-03 Nov 21

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>
));
};
const childNodes = (child) => {
return child.map((childNode) => (
<div>
<div> {childNode.title} </div>
{/* ??? */}
{childNodes(childNode.children)}
</div>
));
};
3 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
EvokeMe
EvokeMe2y ago
Recursion
reactibot
reactibot2y ago
This thread hasn’t had any activity in 12 hours, so it’s now locked. Threads are closed automatically after 12 hours. If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/902647189120118794/1044145934776406097