I'm new to Fable/Elmish/React, and I'm trying to understand the syntax to cast an EventTarget so I can get to the .value
The examples I can find all use the
input [ Value model.Value
OnChange (fun ev -> ev.target?value |> string
]
However I get
None of the types 'EventTarget, string' support the operator '?'
Instead I have to use the following syntax
input [ Value model.Value
OnChange (fun ev -> (ev.target:?> HTMLInputElement ).value
]
So what gives? Am I referencing different assemblies?
You need to
to see the operator
?