Skip to content

Instantly share code, notes, and snippets.

@robot-dreams
Created December 11, 2016 22:52
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 robot-dreams/2d7c03fe6e00eb135dde366dccbced9f to your computer and use it in GitHub Desktop.
Save robot-dreams/2d7c03fe6e00eb135dde366dccbced9f to your computer and use it in GitHub Desktop.
Starter file for elm projects
import Html exposing (Html, program, text)
main = program
{ init = init
, update = update
, subscriptions = subscriptions
, view = view
}
-- MODEL
type alias Model =
{}
init : (Model, Cmd Msg)
init =
({}, Cmd.none)
-- UPDATE
type Msg = NoOp
update : Msg -> Model -> (Model, Cmd Msg)
update msg model =
case msg of
NoOp ->
(model, Cmd.none)
-- SUBSCRIPTIONS
subscriptions : Model -> Sub Msg
subscriptions model =
Sub.none
-- VIEW
view : Model -> Html Msg
view model =
text "Hello, world!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment