How to make existing React to SSR easily

So I got myself in situation, where I’ve build big project based on Reactjs, but it lacks speed (it’s only 30), and SEO is not best (only google indexes but not other search engines, because it’s all JS).

I’m using Vite. They said Vite supports SSR, " it’s just a quick change in settings " .

Well that “quick change in settings” , I have no idea how to do. It seems, like it won’t keep all functionality I’ve made in react. They say “it’s only routing”, but it seems like I’ve made website heavily rely on client side interactions.

I don’t know what to do, how to increase lighthouse score. And how to enable SSR at all.

I tried “switching” to NextJS, I thought like many said “NextJS is like ReactJS :sunny:” yea :cloud_with_rain:, but it’s not same thing at all. I thought I could just import all ReactJS code I’ve written so far, but that’s not possible, and if I did that, NextJS wouldn’t be any different than ReactJS because most of it is still sent to client to work with. As I have to work and basically rewrite whole application on NextJS.

Astro ? Remix ? I don’t know about those… But I just need something where I will keep most of my code intact.

1 Like

Feel like i’ve joined a conversation midway through.

30 what?

Who’s “they”? Why cant “they” tell you how to do it?

“they”, in meaning, people on forums who say “NextJS is same as ReactJS”.
But really it’s different approach. I need to think what can be rendered on server and what on client. When I have a lot of code client side oriented, and I would need to refactor (rewrite) everything then. Basically making NextJS NOT same as ReactJS , or “easy migration”.

30 score on lighthouse. But my Largest Contentful Paint (LCP) is 1.26 s , and it’s green. So I dont know who to trust here.

Yk, “they said, switch to NextJS from ReactJS it’s easy/same”

That’s not the quote i pointed at. I pointed at the one where “they” said that Vite supports SSR with a quick change in the settings.

Whoever “they” was that said that, should be able to tell you what setting to change.

You havent said the letters “SSR” on this forum before, so I have to assume you’re talking about another user on another forum.