Most Elm applications are built using a pattern called The Elm Architecture (TEA). If you have used Redux, this architecture will be very familiar. This is not a coincidence – Redux was heavily inspired by Elm!
This is the Elm architecture:
viewfunction renders the current model to produce our program’s user interface (typically as HTML).
updatefunction, passing in the message and the current model.
updatefunction returns an updated model, and optionally a list of side effects to run (➐).
viewfunction again to render our interface with the updated model. It also performs any side effects requested by our program.
|Function that transforms the state||Update||Reducer|