3 ms·
I think the example in the readme is presented and worded in a confusing way, "Finally, we need to be able to react to any produced messages and change our stat
by mftb 5y ago
I think the example in the readme is presented and worded in a confusing way, "Finally, we need to be able to react to any produced messages and change our state accordingly in our update logic:". Since your referencing the Elm architecture, it's 1. send msg, 2. update 3. view. This is presented, 1. 3. 2. The code looks right, but the example seems out of order and consequently confusing.
- hecrj 5y agoIn a `Sandbox`, messages can only be produced by your `view` logic. An `update` does not always precede `view`. In fact, `view` is called first after initializing the application. Thus, I believe the example in the `README` is following the proper order :)