Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
type Action
= NoOp
| UpdateProtein String
view : Signal.Address Action -> Model -> Html
view address model =
div [] [
div [] [
input
[ type' "text"
, placeholder "Protein"
, myInput address UpdateProtein
] []
]
]
myInput : Signal.Address a -> Action -> Attribute
myInput address action =
on "input" targetValue (\value -> Signal.message address (action value))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.