by badfrog · 7y ago · 0 comments
And what do you do about generic reusuable components that need state? Say a typeahead search that needs to track the input string and the list of results from the server?
A normal practice is to have a model per page. For e.g. https://github.com/rtfeldman/elm-spa-example/blob/master/src...
And you can have another item next to it for global state if you need to. https://github.com/ohanhi/elm-shared-state explains one way to do this