V1 to V2
[BREAKING CHANGE] Context support
Now hook returns function which can be called with any context in order to access it in callbacks
Before
After
[NEW] Reason for cancellation
Now onCancel
receives cancellation context which can be either:
LongPressEventReason.CANCELED_BY_TIMEOUT
('canceled-by-timeout'
)LongPressEventReason.CANCELED_BY_MOVEMENT
('canceled-by-movement'
)
You can access it like this:
Last updated