-
-
Notifications
You must be signed in to change notification settings - Fork 917
Closed
Description
@gorhom I have resolved the error ` ERROR ReanimatedError: Cannot read property '__remoteFunction' of undefined, js engine: reanimated` by defining the callback for `runOnJS` with an arrow function:
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)();
}
}
Originally posted by @levipro in #1324 (comment)
rayhk6 and microstudent