Skip to content

Instantly share code, notes, and snippets.

@flowpoint
Last active September 28, 2017 14:05
Show Gist options
  • Save flowpoint/57ecf2b72bbfe943ae603d50f97baa46 to your computer and use it in GitHub Desktop.
Save flowpoint/57ecf2b72bbfe943ae603d50f97baa46 to your computer and use it in GitHub Desktop.
elm template
import Html exposing(..)
main =
Html.program
{ init = init,
view = view,
update = update,
subscriptions = subscriptions
}
--model
type alias Model =
{ state : Int
}
init : (Model, Cmd Msg)
init =
(Model 1, Cmd.none)
--update
type Msg
= Function
update : Msg -> Model -> (Model, Cmd Msg)
update msg model =
case msg of
Function ->
(model, Cmd.none)
--subscriptions
subscriptions : Model -> Sub Msg
subscriptions model =
Sub.none
--view
view : Model -> Html Msg
view model =
div []
[ button [ ] [ text "" ]
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment