Next.js Discord

Discord Forum

Is useClient component to be static rendering?

Answered
Bloodhound posted this in #help-forum
Open in Discord
BloodhoundOP
https://nextjs.org/learn/dashboard-app/partial-prerendering
Why is navbar to be staic?
This should render in client side because it required pathname for active styles.
Answered by aardani
Static Component can also have client components and server components
View full answer

6 Replies

Answer
In this context, the meaning of static means that it does not pull any data from the request object.

In the contrary, dynamic means that it requires data from the request object, typically to get the user's data to render user's specific data
The Sidebar can be made static because it does not depend on user data when rendering in the serer
Once the sidebar is rendered, it can load client-side JS that detects the requried pathname for active styles
But in terms of server rendering, its still statically rendered on the server
BloodhoundOP
Thank you! Very clear!