On Thursday, March 9, 2017 at 2:44:02 PM UTC, Alex Rice wrote: > > How do you break up the Msg union type and the update function into > logical, manageable and editable pieces in a large Elm project? >
First example I learned from is this one: https://github.com/debois/elm-mdl/blob/v8/demo/Demo.elm Which implemented the nested TEA model. That is, at the top level it wraps actions for each page, and passes them down to the specific pages update: ButtonsMsg a -> lift .buttons (\m x -> { m | buttons = x }) ButtonsMsg Demo.Buttons.update a model This works. Its definitely worth trying out as a learning exercise. That Demo also uses rgrempel/elm-route-url to handle browser navigation and I'm still using that. I am also still using this nested pattern, its just that it has stopped being a default to reach for as I have learned more. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
