-
Notifications
You must be signed in to change notification settings - Fork 65
Topic/create element #37
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
Conversation
The createElement function takes a component factory and props and creates a new component that can be nested in other components.
Can the factory get access to the |
Good point. I think adding something like: foreign import getChildren :: forall props eff. UIRef -> Eff (props :: ReactProps props | eff) (Array UI) Would allow the component to get the passed-in children. I can add this to this PR. |
Allows for access to the implicit `children` prop on components.
I'm not very familiar with this function, but if you're able to verify it works on an example, I'm happy to merge it. |
Great! I will add an example. And |
Just wanted to send a ping on this. Does the above example for |
👍 Sorry for the delay. |
No problem. Thanks for the merge! |
Adds
createElement
that takes a component factory along with a set of props and creates a UI element. I am open for discussion on this one. However, the main use-case is to allow the developer to render their React components from within other React components.