meliorence / react-native-snap-carousel

Swiper/carousel component for React Native featuring previews, multiple layouts, parallax images, performant handling of huge numbers of items, and more. Compatible with Android & iOS.
BSD 3-Clause "New" or "Revised" License
10.24k stars 2.26k forks source link

Fix triggering onSnapToItem on react-native-web #986

Open oleksiisinkov opened 12 months ago

oleksiisinkov commented 12 months ago

Platforms affected

Web

What does this PR do?

As mentioned in this issue expected behavior is triggering onSnaptoItem on web but currently it doesn't work correctly.

This PR fixes triggering onSnapToItem callback on react-native-web.

Fix doesn't affect other platforms.

What testing has been done on this change?

Tested on android, ios, web

Tested features checklist

admin-boclar commented 2 months ago

Hello @oleksiisinkov. Could you explain me how to run this package in web?

It does not render anything on my end, and I see the following error on the terminal: image

It works fine on expo, Thanks!