Docs / ReasonReact / Event

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:

RE
ReactEvent.Form.target(event)##value;

Or, equivalently, using the pipe first operator:

RE
event->ReactEvent.Form.target##value;

More info on the ReactDOMRe module below in the Working with DOM section.