Is useClient component to be static rendering?
Answered
Bloodhound posted this in #help-forum
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.
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
6 Replies
@Bloodhound 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.
Static Component can also have client components and server components
Answer
In this context, the meaning of static means that it does not pull any data from the
In the contrary, dynamic means that it requires 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 dataThe 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!