Hi ! I need to use the react-slick library to create image or component carousels. but I can't use it at all, it gives me this error:
Internal server error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
However, I installed everything and used qwikify to convert my react component into a qwik component
commands I used :
npm install react-slick --save-dev
npm install @types/react-slick
npm install react-carousel
npm run qwik add react
carousel.tsx :
/** @jsxImportSource react */
import { qwikify$ } from "@builder.io/qwik-react";
import Slider, {type Settings} from "react-slick";
const CarouselSlider = () => {
const settings : Settings = {
dots: true,
infinite: true,
speed: 500,
slidesToShow: 1,
slidesToScroll: 1,
};
return (
<Slider {...settings}>
<div>
<h3>1</h3>
</div>
<div>
<h3>2</h3>
</div>
<div>
<h3>3</h3>
</div>
<div>
<h3>4</h3>
</div>
<div>
<h3>5</h3>
</div>
<div>
<h3>6</h3>
</div>
</Slider>
);
}
export const QCarouselSlider = qwikify$(CarouselSlider)```
index.tsx
```tsx
import { component$ } from "@builder.io/qwik";
import { QCarouselSlider } from "~/components/carousel";
export default component$(() => {
return <div>
<QCarouselSlider />
</div>
});
I have no idea what I'm missing or what I'm doing wrong to make it not work 😦
and to be honest I don't even know if this is really a qwik-related problem but any help would really be appreciated.
minimal reproduction here : https://github.com/ericthibergedigitail/qwik-react-slick