Created
April 7, 2019 10:16
-
-
Save ababup1192/98909adb9f372fdb217a930f1f63bf85 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| 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