concept event in category elm

appears as: events, event, event
Elm in Action

This is an excerpt from Manning's book Elm in Action.

Figure 2.10. Handling the event when a user clicks a thumbnail

Elm wires up event handlers a bit differently. Similarly to the way we wrote a view function that translated our current model into a desired DOM structure, we’re now going to write an update function that translates messages into our desired model.

It’s time to simulate the click event! We’ll use the Html.Test.Event module to do this, so let’s add it at the top of PhotoGrooveTests and alias it to Event for brevity:

import Test.Html.Event as Event