Next.js Discord

Discord Forum

Use only client component in a Dashboard or Task Manager

Unanswered
Salman posted this in #help-forum
Open in Discord
Avatar
Hello I have a question. Let's say I want to build a Task manager or Dashboard or any other application that's doesn't need seo but has heavy interactivity.

I will only use server to fetch data or auth related stuff but use client component everywhere else. Isn't this strategy is going to offload some task from server and stop requesting server for every page load or change of UI? In the process my money will be saved!

Also is it bad to make the root layout and pages of this kind application client component?

9 Replies

Avatar
Next.js is still good for dasbhoards, it has lot of features that are useful for dashboards. ex: route groups, parallel routing, and most importantly SSR
Also, instead of making root layout client component, create a layout wrapper which is a client component and wrap the main component in it
Avatar
Thanks @averydelusionalperson for sharing your opinion 🙂

I am a bit curious. What problem will it cause if I make the root layout "use client" ?
Avatar
I don't think you should, it will make any components under it client component, so basically no SSR. well, atleast that's what I remember. I maybe wrong
check this for more details
it has explained my point better
Avatar
Thanks I will read it 🙂
Then let you know.