Skip to content

Conversation

jvidalv
Copy link

@jvidalv jvidalv commented Mar 14, 2025

Description

Right now, passing children to the component does not work, the only children allowed was the one passed within ember while leveraging yield and block features.

This MR allows to pass a direct children prop from the ReactBridge component which will take preference over the block one.

  <ReactBridge
          @reactComponent={{this.reactExample}}
          @props={{hash children="Works string"}}
        />

It does also allow to pass ReactNodes:

 <ReactBridge
         @reactComponent={{this.reactExample}}
         @props={{hash children=this.reactExample}}
       />

@jvidalv jvidalv force-pushed the jv-allow-children-prop-to-be-passed branch from 6d3e08e to ca9332b Compare March 14, 2025 14:04
@jvidalv jvidalv force-pushed the jv-allow-children-prop-to-be-passed branch from ca9332b to 6d57e30 Compare March 14, 2025 14:08
@jvidalv jvidalv self-assigned this Mar 14, 2025
@jvidalv jvidalv closed this Apr 30, 2025
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