Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module App exposing (..)
- import Html exposing (Html, div, text, program)
- -- MODEL
- type alias Model =
- String
- init : ( Model, Cmd Msg )
- init =
- ( "Hello", Cmd.none )
- -- MESSAGES
- type Msg
- = NoOp
- -- VIEW
- view : Model -> Html Msg
- view model =
- div []
- [ text model ]
- -- UPDATE
- 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
- -- MAIN
- main : Program Never Model Msg
- main =
- program
- { init = init
- , view = view
- , update = update
- , subscriptions = subscriptions
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement