On Friday, September 30, 2016 at 2:37:35 PM UTC+1, Rupert Smith wrote:
>
> Firstly, I define a set of call-back functions which will be notified when 
> REST operations complete:
>
> callbacks : Account.Service.Callbacks Model Msg
> callbacks =
>     { findAll = accountList
>     , findByExample = accountList
>     , create = \account -> \model -> ( model, Cmd.none )
>     , retrieve = \account -> \model -> ( model, Cmd.none )
>     , update = \account -> \model -> ( model, Cmd.none )
>     , delete = \response -> \model -> ( model, Cmd.none )
>     , error = error
>     }
>

One addition I am making to this, is to define a default set of 'no action' 
callbacks in the service. Always -> ( model, Cmd.none). Then the consumer 
of the service just needs to override and specify which events they are 
interested in handling.

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