Keeping in mind that this is a post mortem I could tell you what I did.

I had an activePage field that was used in the view to select whatever is
displayed.

I did not have an itemList state because all the information needed was
contained in a business object at the top level.

I did have state for the details page because that contained some of those
pesky small states needed for some UI that dealt with producing an artifact
from the details given.




On Thu, Sep 22, 2016 at 1:42 PM, Lars Jacobsson <lars.jacobsso...@gmail.com>
wrote:

>
> > If you implement the Router in Elm (the implementation starts with Elm),
> then Pages are a reasonable abstraction.
>
> In this scenario - do you wire the state from each separate “page” up into
> the top level app.elm (or wherever the routing lives), or do you let each
> page manage it’s own state without any connection to the top level state?
> In other words: does your top level state look something like this:
>
>         { activePage : String
>         , itemListPageState : List Item
>         , itemDetailPageState : Item }
>
> or does the top level only hold its own state? Something like this:
>
>         { activePage : String }
>
> --
> 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 elm-discuss+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
There is NO FATE, we are the creators.
blog: http://damoc.ro/

-- 
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 elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to