I just started digging into Elm so quite possible that my question has a conceptual problem. Please let me know if so.
I have a module A which is asynchronously reading data from JSON. Module A among other things exposes `getJson` function. As the read is processing data asynchronously it can not just return data structure but returning it's Msg type instead which is: type Msg = FetchSucceed (Maybe Jobs) | FetchFail Http.Error Now if module B imports module A it can call `getJson` method but it will only trigger initial call and then has to listen to `FetchSucceed`: update : A.Msg -> A -> (A, Cmd A.Msg) update msg model = case msg of FetchSucceed a -> (A a, Cmd.none) FetchFail _ -> (model, Cmd.none) My question is if module B has it's own command how does `update` function combines listening to commands from both modules? Thanks. -- 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.
