On Friday, November 18, 2016 at 3:50:51 PM UTC, OvermindDL1 wrote:
>
>
> On Friday, November 18, 2016 at 5:18:27 AM UTC-7, Rupert Smith wrote:
>>
>> I found using a port to enable global communication with the Auth module 
>> from anywhere in my application (any time you get a 401 or 403 you invoke 
>> 'unauthed') to be quite convenient. Perhaps I might find a better solution 
>> to this using out messages, or perhaps Elm will eventually develop some 
>> sort of pub/sub messaging mechanism that I could use instead.
>>
>
> It has that, they are called subscriptions.  ^.^
>
> Subscriptions link to an Effect Module, you can make your own 
> subscriptions via making an effect module (with potentially native module 
> code used by it as well to properly hide all the internals). 
>

Is there any documentation on effects modules? I can kind of guess form 
looking at source code on github for 'navigation', 'window', 'mouse', etc, 
but it takes a bit of figuring out. I think in this case, an effects module 
is not really what I am after, I might be better just to replace what I did 
with 'out messages', and then at least my code would be pure Elm. But I got 
curious now to have a little play around and try to understand effects 
anyway.

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to