Skip to content

Instantly share code, notes, and snippets.

@ethagnawl
Last active March 23, 2016 21:13
Show Gist options
  • Save ethagnawl/a09b8c9abc58495e1fc2 to your computer and use it in GitHub Desktop.
Save ethagnawl/a09b8c9abc58495e1fc2 to your computer and use it in GitHub Desktop.
sharing actions
module ColorPicker where
type Action =
InitialsSaved Bool
| Noop
view address model =
let
context = View.Context
(Signal.forwardTo address (InitialsSaved))
in
View.view context model
app =
StartApp.start {
init = (init, Effects.none),
view = view,
update = update,
inputs = [incomingGameObject]
}
module View (view, Context) where
type alias Context =
{
initialsSaved : Signal.Address Bool
}
view context model =
button
[onClick context.initialsSaved True]
[text "Play!"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment