Return.Optics is a utility library extending Return with
Monocle making a clean, concise API for doing Elm component updates
in the context of other updates.
The signatures abbreviations
pmod is Parent Modelpmsg is Parent Msgcmod is Child Modelcmsg is Child MsgLens to the msg, the second element of the Return tuple.
Refract in a component's update via a Lens and a way to merge
the message back along a parent return in the update function.
Return.singleton model
|> case msg of
...
MyComponentMsg msg ->
refractl Model.myComponent MyComponentMsg <|
MyComponent.update msgRefract in a component's update via an Optional and a way to merge
the message back along a parent return in the update function. If the
getter returns Nothing then the Return will not be modified.
Return.singleton model
|> case msg of
...
MyComponentMsg msg ->
refracto Model.myComponent MyComponentMsg <|
MyComponent.update msg
Lensto the model, the first element of theReturntuple.