Take a look at this
UserAction act ->
case act of
User.SidebarAction (Sidebar.SwitchPage LogOff) ->
init
_ ->
let
(m, e) = User.update act model.user
in
( { model | user = m }
, Effects.map UserAction e
)
Notice how this parent component watches out for one particular child Action and uses that to send an Action to a different child. All other actions are passed down to the destination component as normal
Simon
pattern LogOffAction = User.SidebarAction (Sidebar.SwitchPage LogOff)
...
case act of
LogOffAction -> init
_ -> ...if Sidebar.isLogOffAction action then init