Understanding CSR/SSR
Unanswered
Great Skua posted this in #help-forum
Great SkuaOP
I want to understand something as a beginner
I started working with NextJS
I'm creating a site, and the main thing there is that I have cards of services (my whole main page)
So.. does it mean that my whole <main> content (without header and footer of the page) will be 'use client'?
In the cards, I have the options:
Visit site (external link)
Add to wishlist / Remove from wishlist (there is also a wishlist section of cards)
Ask to transfer (from one service to another)
(I still barely understand CSR/SSR)
I started working with NextJS
I'm creating a site, and the main thing there is that I have cards of services (my whole main page)
So.. does it mean that my whole <main> content (without header and footer of the page) will be 'use client'?
In the cards, I have the options:
Visit site (external link)
Add to wishlist / Remove from wishlist (there is also a wishlist section of cards)
Ask to transfer (from one service to another)
(I still barely understand CSR/SSR)
3 Replies
to be clear,
'use client' still runs the component in the server, so it doesn't change the rendering to CSRyou only need a client component if the component needs some interactivity on the browser, so this usually includes buttons, or reading data from browser storage like
localStoragefrom your description, I think the add/remove from wishlist could be a client component