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

Html msg ++ Html msg #200

Open
domenkozar opened this issue Nov 8, 2019 · 1 comment
Open

Html msg ++ Html msg #200

domenkozar opened this issue Nov 8, 2019 · 1 comment

Comments

@domenkozar
Copy link

It's often useful to define functions like

foobar :: List (Html Msg)
foobar = ...

But it becomes a pain to append with Html Msg. Workaround is wrapping the element, but that often breaks layout due to css rules like ui > li where there shouldn't be an element in between.

@roberth proposed

type alias Htmls msg = List (Html msg)

and rebuild the whole api on top of that.

I'd prefer this was solved inside the language, so that really basic primitives compose well.

@roberth
Copy link

roberth commented Nov 8, 2019

Discussion here, possibly a bit different angle.

https://discourse.elm-lang.org/t/why-is-html-a-single-dom-node/3966

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

No branches or pull requests

2 participants