Open maurorpo opened 1 year ago
I had the same problem. You should use the "use client" declaration on top of the file, where you import the Carousel component
i try but this show me the console
When you are mapping in React or Next, you must always provide a key
attribute to the element that you're returning.
It should look like this:
array.map((item, index) => (
<div key={index}>...</div>
));
It is necessary to do that, because React needs the key
to recognise the elements during re-renders.
You can use any number instead of index
, just make sure it is unique.
thanks for answer, but that is not the error
i fixed that warning but i hava this ( image )
Same answer, use the use client
declaration on top of the file which gives the error
Hello, I have the same problem, but I need to render the carousel on server, any other way to fix it?
@SaerwenLis What carousel are you using? It is possible to render it on server if the package you're using supports SSR.
@SaerwenLis If you need to render it on server, how about hybrid rendering - making carousel separatlely on client component by using 'use client' then just importing on server components/pages? I'm not sure but hope it can help!
@yjleeinkr I already solved it ty
@SaerwenLis How did you solve it? I run into the same problem too and I'm trying to figure what's happening
It does support sever-side, but I prefer using the client because you have to really on the headers with device-agent which isn't very accurate like basic media queries.
I had the same problem. You should use the "use client" declaration on top of the file, where you import the Carousel component
thanks for the solution.
Does ssr working for you ? This lib not working without "use client" and giving you an option ssr={true} which not working cause we can use it only by "use client" how to make it work in ssr any ides ?)
You should use ssr with the deviceType parameter
I found this issue when using RMC with Next Js 13