Commit e1185cd
authored
## Description
The current state machine implementation allows for `onBegin` callback
to be skipped if the native recognizer goes from `UNDETERMINED` directly
to `ACTIVE` state (which is a valid transition in some cases).
This PR updates the logic to "backfill" the `onBegin` callback when
receiving the `UNDETERMINED -> ACTIVE` transition, before calling
`onActivate`.
Note: this PR only changes the behavior for the V3 API. I'm not sure
whether it should be backported to V2 as it would likely be a breaking
change.
## Test plan
This scenario:
https://github.com/software-mansion/react-native-gesture-handler/blob/59a5311e3cf517e9147017f20aa41bc644790a05/packages/react-native-gesture-handler/src/components/GestureButtons.tsx#L67-L68
1 parent 6825dbb commit e1185cd
1 file changed
Lines changed: 5 additions & 0 deletions
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
| |||
0 commit comments