File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
packages/react-native-gesture-handler/src/v3 Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ const HostGestureDetector = (props: GestureHandlerDetectorProps) => {
33
33
34
34
const viewRef = useRef ( null ) ;
35
35
const propsRef = useRef < GestureHandlerDetectorProps > ( props ) ;
36
+ const oldHandlerTags = useRef < Set < number > > ( new Set < number > ( ) ) ;
36
37
37
38
useEffect ( ( ) => {
38
39
attachHandlers ( ) ;
@@ -47,7 +48,11 @@ const HostGestureDetector = (props: GestureHandlerDetectorProps) => {
47
48
] ) ;
48
49
49
50
const attachHandlers = ( ) : void => {
50
- handlerTags . forEach ( ( tag ) => {
51
+ const curHandlerTags = new Set ( handlerTags ) ;
52
+ const newHandlerTags : Set < number > = curHandlerTags . difference (
53
+ oldHandlerTags . current
54
+ ) ;
55
+ newHandlerTags . forEach ( ( tag ) => {
51
56
RNGestureHandlerModuleWeb . attachGestureHandler (
52
57
tag ,
53
58
viewRef . current ,
You can’t perform that action at this time.
0 commit comments