#Embla carousel with SSR
1 messages · Page 1 of 1 (latest)
Hmm, I don't know enough to give you a confident answer yet. The knowledge sources provided do not contain specific information about using Embla Carousel with Server Side Rendering (SSR) in Next.js, or how to get the active item without using client-side features like useEffect.
However, it's worth noting that in Next.js, Server Components and Client Components are used. By default, Next.js uses Server Components, which allows you to automatically implement server rendering with no additional configuration. You can opt into using Client Components when needed. If you want to use a hook like useEffect or useState, you need to create a client component, therefore you need to add the "use client" directive at the top of your file (source (https://nextjs.org/docs/app/building-your-application/rendering/client-components)).