react-native-reanimated-carousel
react-native-reanimated-carousel copied to clipboard
Differ interval for each slide
Hi) In my project, the duration of the display for each slide comes from the backend, can I somehow dynamically set the interval for different slides? Thank you)
you can implement it using onSnapToItem
prop and removing autoPlay
const onSnapToItem = (index: number) => {
const seconds = item[index].seconds;
setTimeout(() => {
ref.current?.next();
}, seconds * 1000); // ms
};