Next.js Discord

Discord Forum

APP SSR and simple interactivity

Unanswered
Northeast Congo Lion posted this in #help-forum
Open in Discord
Avatar
Northeast Congo LionOP
Hello, i would like a clarification if possibile.
I'm using Next App Router to develop a super simple website. The data is dynamic, coming from Storyblok.
My question is: I need simple interactivity (Accordions for instance) in a page. The content of the accordions should, of course, be indexed for SEO.
What's the strategy here?

I need the bloks components to fetch their own data of course, to keep the code simple and separated. Also Storyblok does not support anything else.

From what i can understand, using a server side component precludes any sort of interactivity, even if achievable with two lines of vanilla js. Using a client component that need to fetch some data must be done with useEffect or similar, voiding SEO.

What's the strategy here? Is Next the wrong tool for a website?
Thanks.

1 Reply

Avatar
Rafael Almeida
client components are still pre-rendered on the server, there are no issues using them if you are worried about SEO