Created
March 31, 2019 00:24
-
-
Save madscatter/5df28859cec2296307fcb56cd280a8fa to your computer and use it in GitHub Desktop.
elm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main exposing (main) | |
import Html exposing (..) | |
type alias Model = | |
{ name : String } | |
type Msg | |
= NoOp | |
main : Program Never Model Msg | |
main = | |
Html.program | |
{ init = init | |
, view = view | |
, update = update | |
, subscriptions = subscriptions | |
} | |
init : ( Model, Cmd Msg ) | |
init = | |
( { name = "" }, Cmd.none ) | |
view : Model -> Html Msg | |
view model = | |
text "Hello" | |
update : Msg -> Model -> ( Model, Cmd Msg ) | |
update msg model = | |
case msg of | |
NoOp -> | |
( model, Cmd.none ) | |
subscriptions : Model -> Sub Msg | |
subscriptions model = | |
Sub.none |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment