react-native-reanimated-carousel
react-native-reanimated-carousel copied to clipboard
feat: added onSnapToItem trigger for didMount and update index changing logic
Changes made is to fix below issue:
- No
onSnapToItemtrigger for initially mounted carousel item - For when
loopistrue, the index changes when scrolling beyond 1 loop and back toindex=0, theindexis first changed torawDataLengthbefore resetting to0, which will cause slight delay when updating pagination dots.
⚠️ No Changeset found
Latest commit: 35a593094b260a058005d9736d088431348a6292
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| react-native-reanimated-carousel | ❌ Failed (Inspect) | Jan 8, 2024 2:43am |
Hi @karkengc, let me test it out and see if I can merge it. thank you :)
Hi @karkengc, let me test it out and see if I can merge it. thank you :)
Hi @oliverloops, just wondering have you gone through it yet 😀
Hi @karkengc , don't know if you will find this useful but basically this is what I did this in order to fix the delay
using the exported fn onProgressChange I use the following handler
const handleProgressChange = (_: number, progress: number) => setCurrentIndex(Math.round(progress) % data.length);