Event
ReasonReact events map cleanly to ReactJS synthetic events. More info in the inline docs.
If you're accessing fields on your event object, like event.target.value
, you'd use a combination of a ReactDOMRe
helper and BuckleScript's ##
object access FFI:
REReactEvent.Form.target(event)##value;
Or, equivalently, using the pipe first operator:
REevent->ReactEvent.Form.target##value;
More info on the ReactDOMRe
module below in the Working with DOM section.