I've been tinkering with a React Awesome Slider that you can find here: https://github.com/rcaferati/react-awesome-slider
I've managed to implement it successfully, but I'm struggling to make it autoplay every 10 seconds. I assume I need to utilize the animation hooks for this. I've also tried using the 'infinite' prop, but it doesn't seem to do anything.
const onAnimationStart = ({
element,
currentIndex,
nextIndex,
currentScreen,
nextScreen,
}) => {
/*
... do Something
*/
}
/* ... */
const slider = (
<AwesomeSlider
cssModule={styles}
onFirstMount={onFirstMount}
onAnimationStart={onAnimationStart}
onAnimationEnd={onAnimationEnd}
>
<div data-src="/path/to/image-0.png" />
<div data-src="/path/to/image-1.png" />
<div data-src="/path/to/image-2.jpg" />
</AwesomeSlider>
);