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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if loaded module is really Reanimated in reanimatedWrapper #2179

Merged
merged 1 commit into from
Aug 23, 2022

Conversation

j-piasecki
Copy link
Member

Description

In some cases reanimatedWrapper would not fail when loading react-native-reanimated even though it was not installed, instead loading some other file/module. In my case it was utils file. This caused exception when calling useAnimatedGesture in GestureDetector as methods required by it were not present in the wrapper.

This PR updates reanimatedWrapper so that it checks for existence of useSharedValue on the loaded module and setting it back to undefined if it's not present.

Test plan

I'm not sure how to reliably reproduce it but it worked for me 馃し.

@j-piasecki j-piasecki merged commit 7e1c25c into main Aug 23, 2022
@j-piasecki j-piasecki deleted the @jpiasecki/update-reanimated-wrapper branch August 23, 2022 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants