Why I can’t just use html
- why Browser
is necessary?
I discovered https://elm-lang.org/examples/hello as a better starting point for my understanding of Elm. After elm init
spent quite a while to run it, because online hello doesn’t include module Main exposing (..)
. I’ve got this working example in my browser.
module Main exposing (..)
import Html exposing (text)
main =
text "Hello!"
Now when I read https://guide.elm-lang.org/architecture/buttons.html it explains what Main
is, but uses Browser.sandbox
and doesn’t explain why it is needed if html
module already allows to create content?
main =
Browser.sandbox { init = init, update = update, view = view }
For the tutorial I would appreciate explanation of how to make nested html
markup after being introduced to hello, and before jumping to Model, View. Update part.