I've been using this pattern in a large application for a while now. The way I deal with the init issue is for each component to have two models - the main extensible model, plus it's own model (a locally scoped ComponentModel) which follows the normal nested Elm Architecture pattern. Anything in the shared model is assumed to be preinitialized by the top level Main module, and component's init functions, if they need them, return (ComponentModel, Cmd Msg), and are composed into the main model by the top level init function.
So far this pattern is serving me very well. I keep meaning to write up a blog series about it but haven't found a gap in work to do so yet! -- 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.
