You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assign new handlerTag each time handler is created (#3453)
## Description
A while ago we fixed a problem where Gesture Handler was crashing on `StrictMode`. However, it seems to have broken old API.
>[!TIP]
> Check [this PR](#3247) for context
### Problem
The problem lies in difference between old and new API. In new API, anytime handler is created, it is assigned new `handlerTag`. So in `StrictMode`, we would have the following order:
```
attach 1
drop 1
attach 2
```
Basically handler with tag `1` was created, then dropped, and new handler took its place.
When old API is used, `handlerTag` stays the same. However, because we do not reattach handler if given tag has been dropped, second attach effectively doesn't work.
### Solution
In order to fix that, we assign new `handlerTag` each time `createGestureHandler` is created, Therefore logic with `droppedHandlers` is the same in case of both APIs.
Fixes#3450
## Test plan
Tested on the code from linked issue
0 commit comments