Skip to content
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

Fix for ERROR ReanimatedError: Cannot read property '__remoteFunction' of undefined, js engine: reanimated #1336

Closed
levipro opened this issue Mar 31, 2023 · 3 comments

Comments

@levipro
Copy link

levipro commented Mar 31, 2023

          @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)

@github-actions
Copy link

@levipro: hello! 👋

This issue is being automatically closed because it does not follow the issue template.

@rayhk6
Copy link

rayhk6 commented Apr 16, 2023

Can it be merged ?

@gorhom
Copy link
Owner

gorhom commented Apr 30, 2023

should be address in the next alpha release, the fix already been merged #1346

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants