File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
packages/react-native-gesture-handler/src/v3 Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ const HostGestureDetector = (props: GestureHandlerDetectorProps) => {
19
19
20
20
const viewRef = useRef ( null ) ;
21
21
const propsRef = useRef < PropsRef > ( props ) ;
22
- const oldHandlerTags = useRef < Set < number > > ( new Set < number > ( ) ) ;
23
22
24
23
const detachHandlers = useCallback ( ( ) => {
25
24
handlerTags . forEach ( ( tag ) => {
@@ -28,11 +27,9 @@ const HostGestureDetector = (props: GestureHandlerDetectorProps) => {
28
27
} , [ handlerTags ] ) ;
29
28
30
29
const attachHandlers = useCallback ( ( ) => {
31
- const currentHandlerTags = new Set ( handlerTags ) ;
32
- const newHandlerTags = currentHandlerTags . difference (
33
- oldHandlerTags . current
34
- ) ;
35
- newHandlerTags . forEach ( ( tag ) => {
30
+ // TODO: add memoisation
31
+
32
+ handlerTags . forEach ( ( tag ) => {
36
33
RNGestureHandlerModule . attachGestureHandler (
37
34
tag ,
38
35
viewRef . current ,
@@ -42,7 +39,6 @@ const HostGestureDetector = (props: GestureHandlerDetectorProps) => {
42
39
propsRef
43
40
) ;
44
41
} ) ;
45
- oldHandlerTags . current = currentHandlerTags ;
46
42
} , [ handlerTags , dispatchesAnimatedEvents ] ) ;
47
43
48
44
useEffect ( ( ) => {
You can’t perform that action at this time.
0 commit comments