Skip to content

Fix nested children#112

Merged
Bloomca merged 2 commits into
mainfrom
fix-nested-children
Jul 16, 2026
Merged

Fix nested children#112
Bloomca merged 2 commits into
mainfrom
fix-nested-children

Conversation

@Bloomca

@Bloomca Bloomca commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Description

Fix nested children problem. If we had something like:

   function Wrapper({ children }) {
     return (
       <>
         {children}
         <ConfirmationRenderer />
       </>
     );
   }

This resolves to:

   [
     [<Component1 />, <Component2 />],
     <ConfirmationRenderer />,
   ]

We called Array.isArray(children) ? children : [children] before. It worked because JSX is smart enough to ditch an array if it is a single child, but with multiple children it does not work.

@Bloomca
Bloomca merged commit 3ee6ca5 into main Jul 16, 2026
4 checks passed
@Bloomca
Bloomca deleted the fix-nested-children branch July 16, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant