I use 3 files: - Model.elm -> Where the model goes - Update.elm -> Where the Msg Type is declared and the update function - View.elm -> The View
And for the root I have a Route.elm where I put the coding/decoding of the url and ad App(or Main).elm The Rest part from the Kris Jenkins article I extract to a lib folder, just like my domain models. So I don't reference sibling components and avoid the circular dependency problem while promoting reusability of my code. On Monday, January 2, 2017 at 1:57:15 PM UTC-2, Richard Gebbia wrote: > > Prolific Elm programmers seem to have come to the same conclusion as well: > http://blog.jenkster.com/2016/04/how-i-structure-elm-apps.html > > On Saturday, December 31, 2016 at 6:29:08 PM UTC-5, Brian Marick wrote: >> >> To avoid circular dependencies, I find myself putting type declarations >> in one file: >> >> > module Animals.Pages.Declare exposing (..) >> > >> > type PageChoice >> > = AllPage >> > | AddPage >> > | HelpPage >> >> … and related code in another: >> >> > module Animals.Pages.Define exposing >> > ... >> > toPageChangeCmd : PageChoice -> Cmd Msg >> > toPageChangeCmd page = >> > let >> > ... >> > in >> > Navigation.newUrl url >> >> >> Is that typical, or am I missing something? >> >> >> -- 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.
