Closed stevensonmt closed 4 years ago
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!
Here is what to expect next, and if anyone wants to comment, keep these things in mind.
I also ran into this issue
Ooh, this also seems to affect the next tutorial.
This can be fixed (I think, I'm completely new) by:
adding a main declaration:
main =
Html.program
{ init = init
, view = view
, update = update
, subscriptions = subscriptions
}
Adding a do-nothing subscription:
subscriptions : Model -> Sub Msg
subscriptions model =
Sub.none
I believe the latest version of https://guide.elm-lang.org/ introduces both main
and subscriptions
as they appear in programs, if only to mention that we will cover them in more detail soon. Sorry for the trouble!
Subscriptions are never added in the text of the tutorial. Without defining
main
you can compile without thesubscriptions
section but get an empty view. If you define main asHtml.program
you have to add thesubscriptions
section in order to compile but your view is then correct.