How I write Elm applications
&gt; These functions almost inevitably end up needing something from the top-level application-wide state, so you’ll often see some type signature like this:<p><pre><code>    &gt; updatePersonalInformation
    &gt;    : Model
    &gt;   -&gt; (PersonalInformationModel, Cmd PersonalInformationMsg)
    &gt;   -&gt; (Model, Cmd Msg)
</code></pre>
&gt; This is way too complex already, and this approach doesn’t even actually buy you anything.<p>Is this accurate? I feel like this may not be what the author intended to write, since the update function isn&#x27;t given any kind of message.<p>The author&#x27;s approach has data for every page of your app stored in the model at once, and available to every other page. Also, any page can edit the data for any other page and send messages to any other page. That makes me nervous.<p>We went with having a small amount of global state that was visible to every page, and that every page could update (returning (Model, GlobalState, Cmd Msg)). That seems... basically fine? It&#x27;s still a bunch of boilerplate, but not that much, and I don&#x27;t think we&#x27;ve had significant problems with it. We need Cmd.map and Html.map but I don&#x27;t know why the author thinks this is bad.<p>(The boilerplate is mostly turning `(model, cmd)` into `(model, globalState, cmd)`. On the other hand, we don&#x27;t need to wrap each of our messages with `ThisPageMsg`. Most pages don&#x27;t need global state, and we let them use a regular Msg -&gt; Model -&gt; (Model, Cmd Msg) update function.)<p>(Oh, I think very occasionally we do need to send a message up to the top-level as well. I don&#x27;t remember exactly how we do that. It might be something like... those pages&#x27; update functions take a `PageMsg` and return a type `PageMsg PageMsg | GlobalMsg GlobalMsg`, and the top-level update function interprets `ThisPageMsg (GlobalMsg ...)` and passes through `ThisPageMsg (PageMsg ...)`. Again, boilerplate, but not significantly problematic, and only on pages that need it.)