TextBox
Usage
Basic usage
TextBox.create [
TextBox.text <text-for-box>
TextBox.onTextChanged (fun newString ->
// Do something with the changed string
)
]type State = {
myString: string
}
type Msg =
| ChangeMyString of string
let update msg state =
match msg with
| ChangeMyString newString ->
{ state with myString = newString }
let view state dispatch =
TextBox.create [
TextBox.text state.myString
TextBox.onTextChanged (ChangeMyString >> dispatch)
]Last updated