File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
packages/react-native-gesture-handler/src/v3 Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
- import { useEffect , useRef , useCallback } from 'react' ;
1
+ import { useEffect , useRef } from 'react' ;
2
2
import { View } from 'react-native' ;
3
3
import RNGestureHandlerModule from '../RNGestureHandlerModule.web' ;
4
4
import { ActionType } from '../ActionType' ;
@@ -17,13 +17,13 @@ const HostGestureDetector = (props: GestureHandlerDetectorProps) => {
17
17
const propsRef = useRef < PropsRef > ( props ) ;
18
18
const attachedHandlerTags = useRef < Set < number > > ( new Set < number > ( ) ) ;
19
19
20
- const detachHandlers = useCallback ( ( oldHandlerTags : Set < number > ) => {
20
+ const detachHandlers = ( oldHandlerTags : Set < number > ) => {
21
21
oldHandlerTags . forEach ( ( tag ) => {
22
22
RNGestureHandlerModule . detachGestureHandler ( tag ) ;
23
23
} ) ;
24
- } , [ ] ) ;
24
+ } ;
25
25
26
- const attachHandlers = useCallback ( ( currentHandlerTags : Set < number > ) => {
26
+ const attachHandlers = ( currentHandlerTags : Set < number > ) => {
27
27
const oldHandlerTags =
28
28
attachedHandlerTags . current . difference ( currentHandlerTags ) ;
29
29
const newHandlerTags = currentHandlerTags . difference (
@@ -41,7 +41,7 @@ const HostGestureDetector = (props: GestureHandlerDetectorProps) => {
41
41
) ;
42
42
} ) ;
43
43
attachedHandlerTags . current = currentHandlerTags ;
44
- } , [ ] ) ;
44
+ } ;
45
45
46
46
useEffect ( ( ) => {
47
47
attachHandlers ( new Set ( handlerTags ) ) ;
You can’t perform that action at this time.
0 commit comments