client components vs server components
Unanswered
American Curl posted this in #help-forum
American CurlOP
I'm just reading through documentation, and i'm trying to really understand client components vs server components. I would think that if a component has the 'use client' directive at the top of the file, it shouldn't be rendered in SSR. When i try to disable javascript, however, i still the component.
For reference, i'm just going through the Next tutorial and trying to test my understanding by using 'use client' above the SideNav component. What am i missing?
For reference, i'm just going through the Next tutorial and trying to test my understanding by using 'use client' above the SideNav component. What am i missing?
9 Replies
client component will still be rendered on server at first
then hydrate on browser after
if you have javascript disabled, the component state/event won't work
American CurlOP
yeah this is what i'm reading through and still kinda murky to me :/
if i didn't want a component rendered on the server at first, how would I do that?
use dynamic import with ssr disable
American CurlOP
ok thank you. I'll keep reading through the docs!