Skip to content

Instantly share code, notes, and snippets.

@IntegerMan
Created December 30, 2019 05:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IntegerMan/f5bdc85b95840086de602a37495887e8 to your computer and use it in GitHub Desktop.
Save IntegerMan/f5bdc85b95840086de602a37495887e8 to your computer and use it in GitHub Desktop.
/// Elmish uses this to provide the data context for your view based on a model
let bindings () : Binding<Model, MessageType> list = [
// One-Way Bindings
"ClickCount" |> Binding.oneWay (fun m -> m.ClickCount)
"Message" |> Binding.oneWay (fun m -> m.Message)
// Commands
"ClickCommand" |> Binding.cmd ButtonClicked
"ResetCommand" |> Binding.cmd Reset
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment