Skip to content

Instantly share code, notes, and snippets.

@j-hannes
Last active May 21, 2016 20:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save j-hannes/1f4e17c23d0dd34d1063ac2f2b5ec9f0 to your computer and use it in GitHub Desktop.
Save j-hannes/1f4e17c23d0dd34d1063ac2f2b5ec9f0 to your computer and use it in GitHub Desktop.
Separate main and view
import Html.App as Html
main =
Html.beginnerProgram { model = 0, view = view, update = update }
view state =
div []
[ button [] [ text "-" ]
, span [] [ text (toString state) ]
, button [] [ text "+" ]
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment