Closed m-bert closed 8 months ago
Right now when handlers are dropped, event listeners are not removed from view. I think this might cause problems with SSR. With this PR, listeners are properly removed from underlying view.
https://github.com/software-mansion/react-native-gesture-handler/assets/63123542/e676a513-d505-41db-b302-96538d585c70
https://github.com/software-mansion/react-native-gesture-handler/assets/63123542/5aa8a319-17c4-4ca5-9f44-bbc60b6d0fe3
Event Listeners
Gesture
Description
Right now when handlers are dropped, event listeners are not removed from view. I think this might cause problems with SSR. With this PR, listeners are properly removed from underlying view.
Before
https://github.com/software-mansion/react-native-gesture-handler/assets/63123542/e676a513-d505-41db-b302-96538d585c70
After
https://github.com/software-mansion/react-native-gesture-handler/assets/63123542/5aa8a319-17c4-4ca5-9f44-bbc60b6d0fe3
Test plan
Test code
```jsx import React, { useState } from 'react'; import { StyleSheet, View } from 'react-native'; import { Gesture, GestureDetector } from 'react-native-gesture-handler'; export default function EmptyExample() { const fling = Gesture.Fling(); const tap = Gesture.Tap(); const [g, setG] = useStateEvent Listeners
Gesture
was changed