as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持
感谢您的访问。此页面目前仅提供英语版本。我们正在开发中文版本。谢谢您的理解。

PressEvent Object Type

PressEvent object is returned in the callback as a result of user press interaction, for example onPress in Button component.

Example

{
    changedTouches: [PressEvent],
        identifier: 1,
        locationX: 8,
        locationY: 4.5,
        pageX: 24,
        pageY: 49.5,
        target: 1127,
        timestamp: 85131876.58868201,
        touches: []
}

Keys and values

changedTouches

Array of all PressEvents that have changed since the last event.

Type Optional
Array of PressEvents No

identifier

Unique numeric identifier assigned to the event.

Type Optional
number No

locationX

Touch origin X coordinate inside touchable area (relative to the element).

Type Optional
number No

locationY

Touch origin Y coordinate inside touchable area (relative to the element).

Type Optional
number No

pageX

Touch origin X coordinate on the screen (relative to the root view).

Type Optional
number No

pageY

Touch origin Y coordinate on the screen (relative to the root view).

Type Optional
number No

target

The node id of the element receiving the PressEvent.

Type Optional
number, null, undefined No

timestamp

Timestamp value when a PressEvent occurred. Value is represented in milliseconds.

Type Optional
number No

touches

Array of all current PressEvents on the screen.

Type Optional
array of PressEvents No

Used by


Last updated: Sep 30, 2025