html
html copied to clipboard
Html msg ++ Html msg
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.
Discussion here, possibly a bit different angle.
https://discourse.elm-lang.org/t/why-is-html-a-single-dom-node/3966