Last active
May 21, 2016 21:21
-
-
Save j-hannes/4619ce4bb272addba5d126709abecc74 to your computer and use it in GitHub Desktop.
Adding DOM events
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
import Html.Events exposing (onClick) | |
-- other code | |
view state = | |
div [] | |
[ button [onClick Decrement] [ text "-" ] | |
, span [] [ text (toString state) ] | |
, button [onClick Increment] [ text "+" ] | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment