Closed BerenBoden closed 1 year ago
Hi @BerenBoden,
You should always match any plugin package version with the carousel package version. So upgrade your embla-carousel-react
version to 8.0.0-rc07.
Other than that, please create a public CodeSandbox so I can access it:
Best, David
Issue solved thank you. I had the versions mismatched like you said npm install embla-carousel-react@8.0.0-rc07
fixed it, so now my package.json is
"embla-carousel-autoplay": "^8.0.0-rc07",
"embla-carousel-react": "^8.0.0-rc07",
Bug is related to
Embla Carousel version
8.0.0-rc03
Embla Carousel Autoplay version
8.0.0-rc07
I have tried to add the Autoplay function to the useEmblaCarousel hook in this Showcase.tsx component:
I am getting a type error, specifically the 'Autoplay()' function is a red underline that says:
There is an error in the console that says:
CodeSandbox
- CodeSandbox. - Github.
Steps to reproduce
const [emblaRef] = useEmblaCarousel({});
and the page will display, and the error will go away.Expected behavior
The Autoplay plugin should automatically scroll my slides every X amount of seconds.
Additional context
This happened when I was making a slide in my Next.js application, and I got the error when trying to add the Autoplay() plugin, then made a new Vite app to reproduce, and it still gives the same error.