| id | event |
|---|---|
| title | Event |
| officialDoc | https://github.com/facebook/react-native/blob/main/Libraries/Types/CoreEventTypes.js |
These are the types of objects returned in event callbacks. Concrete aliases
(layoutEvent, pressEvent, …) are instances of SyntheticEvent /
ResponderSyntheticEvent modules.
nullable<'a> below is ReScript's stdlib nullable type.
type t = {
bubbles: nullable<bool>,
cancelable: nullable<bool>,
currentTarget: float,
defaultPrevented: nullable<bool>,
dispatchConfig: registrationName,
eventPhase: nullable<float>,
isTrusted: nullable<bool>,
nativeEvent: 'payload,
target: nullable<float>,
timeStamp: float,
\"type": nullable<string>,
}Helpers such as preventDefault, stopPropagation, persist, etc. are
available on the event value.
Same fields as SyntheticEvent, plus touchHistory.
nativeEvent.layout is a Layout.rectangle (x, y, width, height).
Responder event whose payload includes locationX / locationY, pageX /
pageY, touches, changedTouches, etc.
Payload uses shared layout types:
type payload = {
contentInset: Layout.insets,
contentOffset: Layout.point,
contentSize: Layout.size,
layoutMeasurement: Layout.size,
}type payload = {value: bool}type payload = {target: int}type payload = {
lines: array<{
...Layout.rectangle,
ascender: float,
capHeight: float,
descender: float,
text: string,
xHeight: float,
}>,
}W3C pointer event payload (pointerId, pointerType, coordinates, modifiers,
…). See also View.pointerEventProps.
Payload: {target: float}.