When should i use CSR?
Unanswered
Cape lion posted this in #help-forum
Cape lionOP
n what cases should I use CSR? For example I have a component like and dislike, which is not related to SEO. Should I make it on CSR or use SSR?
1 Reply
Asian paper wasp
Generally, we make the CSR decision by taking a look at whether the SITE needs SEO, not just a particular components.
People usually only consider CSR in component level in an SSR/SSG site is when that particular component doesn't work in the server.
E.g. the color mode toggle button of my personal site (upper right corner of the header). Notice the icon is initially not rendered, because the current theme of the user can't be determined on the server, so it has to be done after rendering in client and read the local storage.
https://mwskwong.com/
In your case, I will need more context to answer it for sure, but I would imagine the answer is generally a no.
People usually only consider CSR in component level in an SSR/SSG site is when that particular component doesn't work in the server.
E.g. the color mode toggle button of my personal site (upper right corner of the header). Notice the icon is initially not rendered, because the current theme of the user can't be determined on the server, so it has to be done after rendering in client and read the local storage.
https://mwskwong.com/
In your case, I will need more context to answer it for sure, but I would imagine the answer is generally a no.