At few points, such “leap of faith” access is the best compromise to compensate for the super-dynamic nature of DOM and event handling.
Extracting the input value from an event is one such point.
I use the following helpers in order to minimise typos:
let getEventValue = e => {
let target = e->JsxEvent.Form.target
(target["value"]: string)
}
let getEventChecked = e => {
let target = e->JsxEvent.Form.target
(target["checked"]: bool)
}