JakubHJ
Reactiflux4y ago
2 replies
JakubH

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>
    ));
  };
Was this page helpful?