You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My component can have multiple children components. They can be of different types: Strings, JSX Components and functions.
<ChildrenCounter>
First
{() => <div>Second</div>}
</ChildrenCounter>
I wanted to render them using React.children.map helper function that unwraps the children opaque data structure. The problem is that children defined as functions seem to be ignored by React.children.map, React.children.count and other helper functions. See the example: