3 ms·
Your state can be a tree, if it needs to be, so you can nest. A normal practice is to have a model per page. For e.g. https://github.com/rtfeldman/elm-spa-exam
by razze 8y ago
Your state can be a tree, if it needs to be, so you can nest.
A normal practice is to have a model per page. For e.g. https://github.com/rtfeldman/elm-spa-example/blob/master/src/Page/Home.elm#L31-L40 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 https://github.com/ohanhi/elm-shared-state explains one way to do this