Server-Side Rendering on a front-end website
Unanswered
Broad-snouted Caiman posted this in #help-forum
Broad-snouted CaimanOP
Should I add Server-Side Rendering to my Next js website which isn't getting any data from APIS etc(for better SEO and performamce)? I really want to do it. How should I do it?
2 Replies
Yakutian Laika
First it would be great if you can share some of your code, tell us how your project is structured so we can give you proper help.
Without knowing the structure of your pages and if your pages are composed by components. I recommend you to create components for the code that's using React hooks or accessing the
Without knowing the structure of your pages and if your pages are composed by components. I recommend you to create components for the code that's using React hooks or accessing the
window object, as small as possible so you can mark them as client components with the 'use client;' directive.Having SSR will benefit your users as most of the code will be rendered on the server and the browser won't need to do much work to make your app work