#Embla carousel with SSR

1 messages · Page 1 of 1 (latest)

kind elkBOT
#

Hi @shrewd bluff. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

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)).

For more specific guidance on using Embla Carousel with SSR in Next.js, I recommend checking the official documentation of Embla Carousel and Next.js, or reaching out to the respective communities for help.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: