Skip to content

Instantly share code, notes, and snippets.

@nojaf
Created November 21, 2016 12:18
Show Gist options
  • Save nojaf/eab421472fcbbfe4abcfa8da4ff10fa0 to your computer and use it in GitHub Desktop.
Save nojaf/eab421472fcbbfe4abcfa8da4ff10fa0 to your computer and use it in GitHub Desktop.
Empty elm structure
import Html exposing (Html, div, text, program)
type alias Model =
String
init : ( Model, Cmd Msg )
init =
( "Hello", Cmd.none )
type Msg
= NoOp
view : Model -> Html Msg
view model =
div []
[ text model ]
update : Msg -> Model -> ( Model, Cmd Msg )
update msg model =
case msg of
NoOp ->
( model, Cmd.none )
subscriptions : Model -> Sub Msg
subscriptions model =
Sub.none
main : Program Never Model Msg
main =
program
{ init = init
, view = view
, update = update
, subscriptions = subscriptions
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment