Brilliant - I always kind of wondered what the model was there for ... now
I know!

On 23 November 2016 at 10:07, Wouter In t Velt <[email protected]>
wrote:

> Your subscriptions also take model as input, so you could do something
> like this:
>
> subscriptions : Model -> Sub Msg
> subscriptions model =
>   if model.followMouse then
>     Mouse.moves MyMsg
>   else
>     Sub.none
>
> You could look at the drag-and-drop example elm-lang.org examples to see
> how conditional subscriptions work.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Elm Discuss" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/elm-discuss/rhAX6tY8bQQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

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