-
Notifications
You must be signed in to change notification settings - Fork 47.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add Portal support to React.Children calls #11378
add Portal support to React.Children calls #11378
Conversation
Now that I think about it, maybe this is actually a breaking change and we can't get it in. Since existing Children users don't assume portals will be there (with different object shape). |
Well, the
And since Portals are included in the
That being said, I'm still not that knowledgable in this code base, so I understand if you think differently. |
Oh I assumed we skip over it. In this case it seems fine to make this work. Maybe it'd be nice if we also released #11279 with this. So that people have a way to check if something is a portal when iterating over children. |
Yeah, good idea! I agree. I was hesitant to expose |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed with @sebmarkbage this should be fine.
Let's also support |
Great, I'll take care of that! |
Solves #11373
Not sure if Portals should expose their children to the
React.Children
call or just the portal itself. Right now it's set up to expose the portal.