Yes, flags works on startup, but it won't work so well after incremental 
updates, will it?

I guess ports is an option (unless you use union types, which makes that 
hard, see the other thread) but I'm a bit concerned about the performance 
overhead of that. With N components the state has to first be serialized to 
JSON once, and then deserialized from JSON to Elm data structure N times. 
Preferably one wouldn't have to go into JS land and back for this to work?

fredag 3. mars 2017 16.37.34 UTC+1 skrev Peter Damoc følgende:
>
> You can pass the common information to the individual Elm components as 
> flags. 
> You could also wire the components by connecting their ports in such a way 
> that one component could push state and that state be sent to the rest of 
> the components. 
>
> On Fri, Mar 3, 2017 at 3:56 PM, Eirik Sletteberg <eiriksl...@gmail.com 
> <javascript:>> wrote:
>
>> Another use case for a migration from JS app to Elm app; You rewrite one 
>> view JS -> Elm, and then another view, and so on, and then some components 
>> on the page are JS views, some are Elm views. But if there is state in Elm, 
>> it would be desirable for all the views to share the same state (for 
>> example session/user state). Is that possible?
>>
>> -- 
>> 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...@googlegroups.com <javascript:>.
>> 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