Skip to content

Topic/dynamic children #54

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

Merged
merged 3 commits into from
Jan 24, 2016

Conversation

ethul
Copy link
Contributor

@ethul ethul commented Nov 28, 2015

I am not sure if this is the best solution to allow for both dynamic and non-dynamic children to be passed to components since we are duplicating all of the DOM and SVG elements; however, I am unsure of a better approach at the moment. I am definitely open to ideas on this.

Allows for creating elements when the child elements are known up front
and also when they are dynamic.

Resolves purescript-contrib#53
@ethul ethul mentioned this pull request Nov 28, 2015
@paf31
Copy link
Contributor

paf31 commented Jan 23, 2016

Is it possible to have both of these use the same foreign function implementation? Perhaps we could use a (newtyped?) Boolean to specify dynamic behavior, and have the existing functions partially apply with false. Dynamic behavior could pass true explicitly possibly.

@ethul
Copy link
Contributor Author

ethul commented Jan 24, 2016

Good call. I've added an IsDynamic newtype and consolidated the FFI.

@ethul
Copy link
Contributor Author

ethul commented Jan 24, 2016

I will merge this to get started on resolving conflicts with #56. But I am open to further tweaks here. I can add them through #56 or just update with a new PR.

ethul added a commit that referenced this pull request Jan 24, 2016
@ethul ethul merged commit ffb8e61 into purescript-contrib:master Jan 24, 2016
@ethul ethul deleted the topic/dynamic-children branch January 24, 2016 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants