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 |
gaearon
left a comment
There was a problem hiding this comment.
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.Childrencall or just the portal itself. Right now it's set up to expose the portal.