meliorence / meliorence/react-native-snap-carousel
Using LottieAnimation and fading caused Carousel to become extremely laggy/buggy on Android
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.5k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
Is this a bug report, a feature request, or a question?
Bug report
Have you followed the required steps before opening a bug report?
(Check the step you've followed - replace the space character between the square brackets ([]) by an x.)
- I have read the guidelines regarding bug report.
- I have reviewed the documentation in its entirety, including the dedicated documentations 📚.
- I have searched for existing issues and made sure that the problem hasn't already been reported.
- I am using the latest plugin version.
- I am following the issue template closely in order to produce a useful bug report.
Have you made sure that it wasn't a React Native bug?
Might be to do with ScrollView, but the issue only arrised when adding fading between slides.
Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?
Bug only present on Android devices with version 7.X.X
Is the bug reproducible in a production environment (not a debug one)?
Yes
Environment
Environment:
React: 16.0.0-beta.5
React native: 0.49.2
react-native-snap-carousel: 3.3.4
Target Platform:
Android (7.0)
Expected Behavior
I would expect a double swipe would move the carousel twice.
Actual Behavior
Carousel shows text of 3rd slide, but after LottieAnimation loads (seemingly) carousel springs back to 2nd slide. Also, it is easily reproducible when I swipe quickly for my whole renderItems content to disappear. Very strange behaviour. Also, the whole carousel is generally very laggy to the point it is barely usable.
Reproducible Demo
(Paste the link to a Snack example in which the issue can be reproduced. Please follow the guidelines for providing a Minimal, Complete, and Verifiable example.)
Steps to Reproduce
(Write your steps so that anyone can reproduce the issue in the Snack demo you provided.)
- Create a carousel with a LottieAnimation and a piece of text for each slide
- Include at least 3 slides
- Double swipe quickly
- Swipes are laggy and content "springs" back to the 2nd slide - Wrong (we expect it to stay on the 3rd slide)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file, test, or reproducible demo is provided. Start by reading README.md, doc/KNOWN_ISSUES.md, and doc/CUSTOM_INTERPOLATIONS.md, then reproduce the Android 7.0 case with LottieAnimation, fading, and rapid swipes. Done means the carousel remains responsive, content does not disappear, and a double swipe reaches the third slide without springing back.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, javascript, react-native
- Domain
- mobile, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100