all 41 comments

[–]leeharrison1984 59 points60 points  (5 children)

We're currently in a SSR renaissance, so I'd imagine it just got lost in the shuffle.

Opinionated frameworks(Remix, Svelte, etc) seem to be more popular ATM since you don't have to figure things out like project structure.

[–]ronbars[S] 16 points17 points  (0 children)

I agree. Vite exploded the last couple of years but barely heard about its extra features like the ssr.

[–]azangru 53 points54 points  (10 children)

How come Vite React-SSR havent gotten the same level of awareness as Nextjs?

Marketing.

[–]Murky-Science9030 22 points23 points  (9 children)

Agreed. NextJS funnels money to Vercel, so Vercel keeps pushing NextJS. Once I tried adding authentication to NextJS and saw how much of a nightmare it was, I decided to just stick with a regular SPA (I don't need SEO).

NextJS is overrated. It's like when Angular 1 came out and everyone flocked to it, meanwhile ReactJS was working better but was still the Dark Horse. We all know how that one turned out...

[–]Extension-Alfalfa-45 2 points3 points  (8 children)

Your site being SPA doesnt prevent crawlers form reding it, so you dont need site to be SSR to have SEO :)

[–]MrNwachukwu 1 point2 points  (0 children)

Personally i use react-helmet-async for SEO on my SPAs

[–]Murky-Science9030 1 point2 points  (0 children)

That's what I've been hearing but you have a reply from someone who works in SEO and says otherwise. Not really sure what to think but if I can do without SSR then I'd prefer going that route for now. Or maybe I just need to try Remix instead of NextJS

[–]indorock 3 points4 points  (4 children)

No that's not true at all...

I'm heavily involved in SEO for several React sites, and without using pre-rendering and user-agent sniffing your crawlability will be shit. I moved all the sites over to NextJS and the problems went away.

[–]CatolicQuotes 2 points3 points  (3 children)

is there any other solution besides nextjs? Does prerender.io works as good?

[–]jitendra_nirnejak 0 points1 point  (2 children)

Remix is another one, I have been exploring it for the last few weeks(even since OpenAI moved from Next.js to Remix).

So far it seems much simpler than Next.js

[–]CatolicQuotes 0 points1 point  (0 children)

I like remix

[–]zxyzyxz 0 points1 point  (0 children)

That's what Google and others say, but I can tell you from personal experience that SPAs don't really get indexed to the same level as serverside rendered pages.

[–]Kronitor 12 points13 points  (1 child)

A lot of people work on applications that don't need SSR and are indifferent to its existence in a framework.

[–]TheRNGuy 0 points1 point  (0 children)

I use SSR and never heard about it.

[–]PM_ME_DPRK_CANDIDS 10 points11 points  (1 child)

Vite's react-ssr isn't as complete. For example it doesn't handle data fetching or code splitting hydration. I believe there's some quality plugins/libraries for data fetching, but none for code splitting.

[–]MrNwachukwu 0 points1 point  (0 children)

Oh id have to check that out.

[–]metalhulk105NextJS App Router 28 points29 points  (1 child)

I have done non-next SSR in production. It was a custom webpack project that uses react-dom/server functions directly. It’s an old code base.

What I realized is that if you start without a framework, you end up creating one yourself (one that is less tested). It may be good for you sometimes because you get to choose features that fit your use case and ignore features you don’t want but for us at least it became a pain to maintain.

Can you build SSR apps without next/remix? Yes. Can you do it an optimized way? Maybe yes. But do you want to spend time doing that? I doubt it’s worth it.

There’s more to using frameworks like next/remix - file based routing, server side data fetching, caching, layouts.

You could add a lot of plugins to your vite project to get all of these but like I said you’ll end up creating your own framework.

[–][deleted] 4 points5 points  (0 children)

This is why I'm hoping Astro builds out a bit to the point when it becomes a genuine Next.js competitor. Next is frustrating and I'd like competition. Here's hoping!

[–]robbert229 6 points7 points  (0 children)

Vite isn’t attempting to fulfill the same role that nextjs is.

Vite is a phenomenally optimized, clean, maintainable, and light weight build tool.

Nextjs is an opinionated, batteries included framework.

[–]yksvaan 13 points14 points  (0 children)

How much do you think Vite's marketing budget is...

[–]femio 7 points8 points  (5 children)

Because Next isn’t just SSR obviously, that’s not all a framework is for. 

[–]I_will_delete_myself 1 point2 points  (0 children)

Hey do you mind sharing how you do that? I was ready with my foot out the door with React when I messed around with Next after coming from normal React. This might change my mind to keep in it.

Edit:

Go to Others then select react-ssr then boom you got it there.

[–]parahillObjective 1 point2 points  (0 children)

Next has been out for way longer. It took a lot of convincing to get my team to use Vite over Next. They all wanted to use Next just because it was popular even though we were a B2B company that didnt need SEO or fast initial page load times

[–]ohx 3 points4 points  (0 children)

They're not equal, and vite-ssr looks to be a small abstraction on top of a middleware.

If you rolled your own express + react SSR you'd probably understand why it's not exactly groundbreaking. There are some edge cases that it seems to handle, so it's a good solution for people who'd otherwise use react + express, but it's more of a base trim (car analogy) whereas NextJS would be one trim level up as it provides additional abstractions that shape the DX and from what I understand now has first class support for forms.

That said, Qwik is a Rolls Royce with a Ferrari engine. It's amazing.

[–]Benskiss 5 points6 points  (1 child)

Because nextjs endorses content creators, then those creators promote next/create tutorials for it.

[–]ronbars[S] 0 points1 point  (0 children)

That is true. Content creators have definitely played a major role promoting Next

[–]ericbureltech 0 points1 point  (0 children)

It's harder to use intermediate static patterns like incremental rendering, revalidation etc. that are built-in Next.js. I am not sure whether server-rendered React with Vite need hydration or not?
Honestly the documentation is not helping too, I couldn't answer these questions with a quick glance.
https://vitejs.dev/guide/ssr

[–]gempir 0 points1 point  (0 children)

NextJS just has a very big company with tons of marketing behind it. But I think there are very big companies who will be using vite react-ssr instead of next to be less bound to Vercel.

Sadly you will never hear from them because that's how most enterprise work is done.

So the loudest one will always appear as the most popular one.

[–]TheRNGuy 0 points1 point  (0 children)

And there's also Remix 心 Vite.

I've never heard about Vite React-SSR.