Permalink
Cannot retrieve contributors at this time
Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign up
Fetching contributors…

module Main exposing (main) | |
import Browser | |
import Html exposing (button, div, input, text) | |
import Html.Attributes exposing (readonly, type_, value) | |
import Html.Events exposing (onClick) | |
main = | |
Browser.sandbox | |
{ init = 0 | |
, update = \_ count -> count + 1 | |
, view = view | |
} | |
view count = | |
div [] | |
[ input [ type_ "text", value (String.fromInt count), readonly True ] [] | |
, button [ onClick () ] [ text "Count" ] | |
] |