Here's an example 
https://github.com/knewter/time-tracker/tree/master/elm/src

I've experimented with this approach, but it didn't "feel" right to me.

On Tuesday, March 21, 2017 at 1:11:54 PM UTC+2, Eirik Sletteberg wrote:
>
> Is it an option to make all the updaters deal with the root model and the 
> root message?
> And in the "main" updater, just compose the other updaters?
> It could make things simpler, but hurt isolation. Also I'm not sure 
> whether that would introduce circular dependencies between modules?
>
> mandag 20. mars 2017 12.58.38 UTC+1 skrev Eirik Sletteberg følgende:
>>
>> In larger Elm apps, it makes sense to divide Updaters so you can 
>> package-by-feature.
>> For example, a single page application could have updaters like this:
>>
>> - Configuration updater
>> - Session updater
>> - User Profile updater
>> - User Settings updater
>> - Content updater
>> - Some other business specific updater
>>
>> The challenge is when there are dependencies between Updaters, for 
>> example the User Profile model might need data from the Session model, the 
>> Session updater might need to send messages to the User updater (Load user 
>> profile when session is updated), or the Content updater may need to check 
>> for the Session updater (get session ID to send as parameter to the API 
>> when fetching content), or some business-specific updater may need to 
>> interact with both the Content updater, the User updater, and the 
>> Configuration updater.
>>
>> In Redux, one would use combineReducers to mount each reducer under its 
>> own path, and then one can trigger actions across reducers. How would you 
>> solve this in Elm?
>>
>>

-- 
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