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

feat: added use native driver configurable support #1

Conversation

vibhor-d11
Copy link

@vibhor-d11 vibhor-d11 commented Mar 5, 2024

Issue link: meliorence#1011

Issue overview: Currently their is no provision to enable/disable useNativeDriver for react native snap carousal. For carousal animations useNativeDriver is set to true i.e they run on UI thread by default. We encountered some crashes related to Animated node that occurred only on Android 12 devices and after digging into it we get to know it is related to useNativeDriver set to true for carousal animations. Also their is an open issue in react-native related to this crash: facebook/react-native#33375. So we added a patch in react-native-snap-carousal library for disabling useNativeDriver for devices having Android 12 and that reduces the crash rate for that crash with very few instances now. We have been using this for almost a year and haven't faced any issue with our app exposed to more than 20 million users. So we though of adding support for enable/disable useNativeDriver for react-native-snap-carousal as a exposed prop.

@pavangoyal42
Copy link

Hi @IsaiaPhiliph We at dream11 are using this patch since a year now and app is working fine. Could you please take a review of this PR?
Thanks,

@yasir6jan
Copy link

Hi @IsaiaPhiliph
Is there any planned release including the above changes?

@IsaiaPhiliph
Copy link
Owner

I didn't make the release, because this commit i merged was for v3 of the package, it is not compatible with v4, if you find the fix for v4 let me know and I will release it.

@yasir6jan
Copy link

@IsaiaPhiliph The commit was merged in react-native-snap-carousel-v4 repo. Is there any other repository for v4?

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.

4 participants