Skip to content

Instantly share code, notes, and snippets.

@ababup1192
Created April 7, 2019 10:16
Show Gist options
  • Select an option

  • Save ababup1192/98909adb9f372fdb217a930f1f63bf85 to your computer and use it in GitHub Desktop.

Select an option

Save ababup1192/98909adb9f372fdb217a930f1f63bf85 to your computer and use it in GitHub Desktop.
port module Main exposing (Model, Msg(..), init, main, update, view)
import Browser
import Browser.Navigation as Nav
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
-- ---------------------------
-- MODEL
-- ---------------------------
type alias Model =
()
init : () -> ( Model, Cmd Msg )
init _ =
( (), Cmd.none )
-- ---------------------------
-- UPDATE
-- ---------------------------
type Msg
= NoOp
update : Msg -> Model -> ( Model, Cmd Msg )
update msg model =
( model, Cmd.none )
-- ---------------------------
-- VIEW
-- ---------------------------
view : Model -> Html Msg
view model =
text "hello"
-- ---------------------------
-- MAIN
-- ---------------------------
main : Program () Model Msg
main =
Browser.document
{ init = init
, update = update
, view =
\m ->
{ title = "カウンター"
, body = [ view m ]
}
, subscriptions = \_ -> Sub.none
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment