# What's wrong with using Html.map?

**URL:** <https://discourse.elm-lang.org/t/whats-wrong-with-using-html-map/8105>\
**Category:** Learn\
**Created:** [January 25, 2022, 5:15pm UTC](https://discourse.elm-lang.org/t/whats-wrong-with-using-html-map/8105 "2022-01-25T17:15:55Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![francescortiz](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/francescortiz/32/1721_2.png) [@francescortiz](https://discourse.elm-lang.org/u/francescortiz)\
**Post date:** [January 26, 2022, 1:37pm UTC](https://discourse.elm-lang.org/t/whats-wrong-with-using-html-map/8105/3 "2022-01-26T13:37:44Z")

</div>

> [@wolfadex](#):
>
> I think part of the what the Html docs are trying to suggest, though not too well, is that you shouldn’t break up your code until you need to. I.e. don’t do premature optimization around pages/components.

There is a recent threat that elaborates further on the howtos of this principle:

> [@Should a module expose its Msg constructors?](https://discourse.elm-lang.org/t/should-a-module-expose-its-msg-constructors/8054):
>
> I have a ParentModule.update function, which in turn calls ChildModule.update function. Nothing weird, very basic, very normal The Elm Architecture stuff. Should ChildModule expose the constructors for its Msg type? Should the ParentModule.update function be able to inspect the child’s messages? Should the Msg constructors be considered part of the interface, or should the type be opaque? Does anyone have actual experience with a pattern where a parent update function eavesdrops on the chil…

---

_[View the full topic](https://discourse.elm-lang.org/t/whats-wrong-with-using-html-map/8105)._
