Skip to content
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

feat(react-modifier) Allow children prop to be passed #55

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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
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