Animations
let animatedLabelRef = ViewRef<Label>()
let view dispatch model =
Label("Rotate")
.reference(animatedLabelRef) let mutable label = None
View.Label(text="hello", created=(fun l -> label <- Some l))Animations
let animatedLabelRef = ViewRef<Label>()
let update msg model =
match msg with
| Poked ->
match animatedLabelRef.TryValue with
| None -> ()
| Some c -> c.RotateTo (360.0, 2000u) |> ignore
let view dispatch =
VStack() {
Label("Rotate")
.reference(animatedLabelRef)
Button("Rotate", Poked)
}Last updated