How to get current index of the carousel when the swipe event occurs – react slick

Advertisements I had some problems with customizing the library dots, so I’m creating one manually. I’m trying to get the current index of the carousel when the swipe event occurs. I tried the onSwipe props, but it just returns the swipe direction My Slider component: export function PromotionalCarousel({ infinite = false, speed = 500, slidesToShow,… Read More How to get current index of the carousel when the swipe event occurs – react slick

it's not working rerendering when array state change in react [react-slick]

Advertisements This is my React code. I use react-slick library. I expect 1. when clickedIndex changes 2. it calls useEffect 3. option state change 4. rerender this EnlargePhto component 5. StyledSlider is affected by changed option. 6. combineMood_1 array’s initialSlide = clickedIndex 7. ex) clickedIndex = 8 –> StyledSlider start at 8 image. BUT,, it… Read More it's not working rerendering when array state change in react [react-slick]