Re: [elm-discuss] Re: Implementing a protocol on top of WebSocket: should I build a effect module ?

2017-05-18 Thread Christophe de Vienne
This night I found a way to avoid pushing the nats State to all the components: now I just have them return NatsCmd along with their model and normal commands, which is what you describe in the first part of your email (I am still working on it). It makes the API a lot nicer, although the root com

Re: [elm-discuss] Re: Implementing a protocol on top of WebSocket: should I build a effect module ?

2017-05-18 Thread 'Rupert Smith' via Elm Discuss
On Wednesday, May 17, 2017 at 5:02:55 PM UTC+1, Christophe de Vienne wrote: > > The main thing that bothers me is that I will need to pass the > Nats.State to every update function because subscribing requires an > update of the state... And I see no way to avoid that except using an > effect mo