-
-
Notifications
You must be signed in to change notification settings - Fork 743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate react-native-gesture handler to version ^2 #912
Comments
Even we are facing the same issues in our project. We are currently using "react-native-gesture-handler": "2.4.1" and it requires a piece of code to be commented in MainActivity. When removed, the backdrop press doesn't work in Android Bottom Sheet, works fine in IOS. Any help? @gorhom |
We are also facing same issue, works fine in iOS but issue with Android. Any help? |
I am also facing the same issue...Any solutions yet? |
it is a warning not an issue. I got no plan to upgrade to GH2 for now. |
Agreed its a warning, however as per RNGesture Handler Version 2, they have deprecated RNGestureHandlerEnabledRootView. Also, if you remove the piece of code from MainActivity, the backdrop of bottom sheet in Android is not clickable and the swipe gestures doesn't work as well. |
Just wrap you App with |
@gorhom I am also facing the exact same issue as @tradebulls. I have tried @hirbod's solution but that didn't work. |
After adding @gorhom/bottom-sheet and migrating to react-native-gesture 2.4.2 I have this error in android. DO you have any idea? e: /Users/user_name/Projects/project_name/frontend/node_modules/react-native-gesture-handler/android/reanimated/src/main/java/com/swmansion/gesturehandler/ReanimatedEventDispatcher.kt: (5, 22): Unresolved reference: reanimated FAILURE: Build failed with an exception.
|
@hirbod Can you share some code snippet to help me? |
Solved. I noticed in package.json that the devDependency for react-native-gesture-handler is 1.10.3, so I downgrade to that version. |
@gorhom I did some investigation and it looks like the breaking changes between Are you open to a contribution for v2 support? |
@tradebulls this might be helpful for you, it's what @hirbod was getting at. Take a look at how react-navigation does it. |
@Gfr1992 Did you mean you downgraded from |
Managed to fix the issue with @hirbod @jspizziri solution. I was wrapping GestureHandlerRootView in App.js. Tried adding it in index.js and it worked. Thanks guys for your help :) |
Yes |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Is there a solution for this? We are getting crashes in production and it appears to be because we have multiple libraries that depend on different versions of gesture-handler. Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: TypeError: this.InnerNativeModule.configureProps is not a function. (In 'this.InnerNativeModule.configureProps(n,t)', 'this.InnerNativeModule.configureProps' is undefined)', reason: 'Unhandled JS Exception: TypeError: this.InnerNativeModule.configureProps is not a function. (In 'this.InnerNativeModule.configureProps(n,t)', 'this.InnerNativeModule.configure..., stack: |
Thank you @hirbod ! Your fix worked for me as well. @tradebulls - Here's an excerpt from our
|
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
hi everyone, would you mind testing #1126, and report your findings :) yarn add ssh://[email protected]:gorhom/react-native-bottom-sheet#feature/rewrite-gesture-handler-2 |
Not sure if I should put this comment here or in #1125, but for other reasons we had to upgrade to gesture handler 2.x, and have been testing this on Android and iOS since December with much success. We only have a somewhat simple BottomSheet, but it's used many places throughout the app, and it has scrolling views, left/right swipes for more content, dynamic snap points, and everything just works as expected. With the positive test results we are going to production this week with your v5 branch. If there is one wish I would have liked if you released an alpha version to npm of v5 so we could use that in our package.json instead of the github url, but no big deal :) Keep it up! |
same me |
Feature Request
There is a new version of react-native-gesture-handler with new API.
Why it is needed
There are warnings in the console:
Possible implementation
Add react-native-gesture-handler version ^2 and replace old API with new API
Code sample
/
The text was updated successfully, but these errors were encountered: