html icon indicating copy to clipboard operation
html copied to clipboard

Html msg ++ Html msg

Open domenkozar opened this issue 6 years ago • 1 comments

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.

domenkozar avatar Nov 08 '19 13:11 domenkozar

Discussion here, possibly a bit different angle.

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

roberth avatar Nov 08 '19 13:11 roberth