I want to remove the first slide in react with swiper js. I looked in the API and found swiper.removeSlide(slideIndex), but that doesn't seem to work. I am using the useSwiper hook. But still, I am getting 'swiper.removeSlide is not a function'. Anyone how I could handle this?
import React, { useEffect } from "react";
import { useSwiper } from "swiper/react";
const DeleteSlide = ({}) => {
const swiper = useSwiper();
useEffect(() => {
setTimeout(() => {
swiper.removeSlide(0);
swiper.activeIndex = 0;
swiper.initialSlide = 0;
}, 9000);
}, []);
return <></>;
};
export default DeleteSlide;