cloudflare / react-gateway

Render React DOM into a new context (aka "Portal")
BSD 3-Clause "New" or "Revised" License
571 stars 72 forks source link

Support multiple children, expose gateway registry #18

Closed marksteyn closed 7 years ago

marksteyn commented 7 years ago

I know this functionality was previous removed, but doing so causes an issue with cf-ui/cf-component-modal, which now fails if you define more than one modal at at a time.

Supporting multiple children seems like the best solution to me, but what were the reasons for its previous removal, and are they still relevant?

I also want to expose the GatewayRegistry to enable integration with our backbone codebase. Since we can't have a single component wrapping all the react code, I want to create a registry provider component to wrap all our react-views which uses a single shared registry.

jwineman commented 7 years ago

@terinjokes @tajo might be able to provide more background as to why it was removed initially.

tajo commented 7 years ago

Not really. I've never followed this lib. I'm maintaining one that's very similar but much simpler (it doesn't allow different targets/destinations that document.body).