Just to be clear, I am definitely not promoting “components”. I also used Html.map
AND a (SmallComponentMsg -> msg)
together in my example, it was not a choice of one OR the other:
-- Passed in a (SmallComponentMsg -> msg) arg as toMsg.
someView : (Msg -> msg) -> Model -> Html msg
someView toMsg model =
Html.div
[ onClick DoStuff ]
[ ... ]
|> Html.map toMsg
-- Applied it with Html.map