Skip to content

Instantly share code, notes, and snippets.

@nqthqn
Last active August 29, 2017 23:57
Show Gist options
  • Save nqthqn/87c4b8335eed0755d982e4a8865f0c75 to your computer and use it in GitHub Desktop.
Save nqthqn/87c4b8335eed0755d982e4a8865f0c75 to your computer and use it in GitHub Desktop.
beginnerProgram boilerplate
module Main exposing (..)
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
type alias Model = Int
type Msg = NoOp
update : Msg -> Model -> Model
update msg model =
1
view : Model -> Html Msg
view model =
text "boilerplate!"
main : Program Never Model Msg
main =
beginnerProgram
{ update = update
, view = view
, model = 1
}
@nqthqn
Copy link
Author

nqthqn commented Aug 29, 2017

module Main exposing (..)

import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)


type alias Model =
    Int


type Msg
    = NoOp


update : Msg -> Model -> ( Model, Cmd Msg )
update msg model =
    ( 1, Cmd.none )


view : Model -> Html Msg
view model =
    text "boilerplate!"


main =
    program
        { update = update
        , view = view
        , init = ( 1, Cmd.none )
        , subscriptions = always Sub.none
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment