-
-
Notifications
You must be signed in to change notification settings - Fork 794
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
chore: updated reanimated to v3 #1324
Conversation
LGTM 🗿 |
hi, @gorhom , I've tried 5.0.0-alpha.0 , but the issue |
@YaoHuiJi it is related to software-mansion/react-native-reanimated#4201, it only occurs in development |
hi @gorhom , I tried to run it in release mode, but the error still seems to be there, here is the xcode log:
In my app, when the keyboard is open( a BottomSheetTextInput in bottom sheet modal has the focus), then If you drag the bottom sheet modal to resize it to another snap point, this error will occur. |
@gorhom We face a similar issue on Android and it usually occurs because of BackdropComponent with reanimated v3.0.2. Any plans of rolling v5 out soon? |
I didn't get enough time to dig deep into this, but I can confirm that there seems to be issues with the Backdrop, BottomSheetFlatList Components only while using fabric. After I turn fabric off, everything seems to be okay. |
"react-native-maps": "^0.30.1", | ||
"react-native-pager-view": "^5.4.24", | ||
"react-native-reanimated": "~2.12.0", | ||
"react-native-reanimated": "~2.14.4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi 👋, @gorhom I have a question
Isn't this PR for updating reanimated v3?
I'm wondering why the changed version is v2.14.4 of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, why is this using reanimated 2.14.4?
@gorhom I have resolved the error diff --git a/node_modules/@gorhom/bottom-sheet/src/hooks/useGestureEventsHandlersDefault.tsx b/node_modules/@gorhom/bottom-sheet/src/hooks/useGestureEventsHandlersDefault.tsx
index b44bfa5..0b029d3 100644
--- a/node_modules/@gorhom/bottom-sheet/src/hooks/useGestureEventsHandlersDefault.tsx
+++ b/node_modules/@gorhom/bottom-sheet/src/hooks/useGestureEventsHandlersDefault.tsx
@@ -44,6 +44,10 @@ export const useGestureEventsHandlersDefault: GestureEventsHandlersHookType =
} = useBottomSheetInternal();
//#endregion
+ const dismissKeyboard = () => {
+ Keyboard.dismiss();
+ };
+
//#region gesture methods
const handleOnStart: GestureEventHandlerCallbackType<GestureEventContextType> =
useWorkletCallback(
@@ -296,7 +300,7 @@ export const useGestureEventsHandlersDefault: GestureEventsHandlersHookType =
absoluteY > WINDOW_HEIGHT - animatedKeyboardHeight.value
)
) {
- runOnJS(Keyboard.dismiss)();
+ runOnJS(dismissKeyboard)();
}
}
|
@levipro thank you! it works! |
Same issue using BottomSheetVirtualizedList + Fabric. Using just VirtualizedList from RN fixes the error, but the BottomSheet does not work as expected |
@gorhom I also tested with the last 5.0.0-alpha0 version and same error |
+1 Started having the same issue after enabling the new arch |
Motivation
Part of the requirements for #1125 , i have updated reanimated to v3 and react native to 71.
Known Issues
this issue is triggered when calling
Keyboard.dismiss
on JS thread, seems related to software-mansion/react-native-reanimated#4201.