Closed offcarlospetit closed 4 weeks ago
Hi @offcarlospetit, thanks for the report!
Have you tried using RNGH
version 2.20.0
?
Version 2.16.1
is quite dated and definitely wasn't prepared for React Native
version 0.75.4
Hi @offcarlospetit, thanks for the report! Have you tried using
RNGH
version2.20.0
? Version2.16.1
is quite dated and definitely wasn't prepared forReact Native
version0.75.4
Actually, I hadn't done that because I initially installed the Expo module in a bare RN app, and I relied on the npx expo install react-native-gesture-handler command, which installed an older version. However, I just installed the latest version you mentioned (2.20.0), and it works perfectly. Thanks for the suggestion!
Description
When trying to compile my app using version ~2.16.1 of
react-native-gesture-handler
, I encounter an error in theinit
method related toRNGestureHandlerTouchEvent
. The error occurs due to an unsafe operation when trying to get theSurfaceId
fromhandler.view
. Although I managed to fix the issue by modifying the source code, I believe this should be addressed in the official library.The build fails with the following error:
RNGestureHandlerTouchEvent Type mismatch: inferred type is View! but String was expected
I modified the code in
RNGestureHandlerTouchEvent
to add null checks in theinit
method:Steps to reproduce
RNGestureHandlerTouchEvent
function.Snack or a link to a repository
https://github.com/offcarlospetit/testIssue
Gesture Handler version
2.16.1
React Native version
0.75.4
Platforms
Android
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
Fabric (New Architecture)
Build type
Debug mode
Device
None
Device model
No response
Acknowledgements
Yes