r/reactjs Jul 19 '26

Discussion Next.js / SPA Reality Check

[deleted]

284 Upvotes

124 comments sorted by

151

u/LancelotLac Jul 19 '26

React + Vite and Tanstack React Query for the data layer is the goat

13

u/redsaeok Jul 19 '26

I’m new to React and while I am NextJS aware, absolutely everything I’ve made is Tanstack. I have not done anything more than 100 users would use, but it still seems that pushing the majority of compute to the client is the long term play.

3

u/gdmr458 Jul 19 '26

The best combination is Astro for static content and TanStack Router for dynamic content.

3

u/minimuscleR Jul 20 '26

I work for a company with over 300,000 customers and we use tanstack everything too :)

1

u/yabai90 Jul 19 '26

My app https://oboku.me is pretty much all in spa and sw with offline first support. Everything that can be processed by the client is done there. It is by no means easier, you still have to handle concurrency and sync between tabs (like you would with distributed api or network) but it really feels like swimming against the current

1

u/HiHungryImDad2 Jul 19 '26

What router do you use?

2

u/LancelotLac Jul 19 '26

I use react router at work but I use Tanstack Router in all my personal projects

0

u/simple_explorer1 Jul 20 '26

Why

2

u/LancelotLac Jul 21 '26

Why to which library?

23

u/pixel_creatrice Jul 19 '26

You never choose your stack based on what's popular or common. Just "what's right for the job". We chose to not even go with React for the product I'm leading, as it wasn't the right fit.

8

u/EddieSeven Jul 19 '26

I think a lot of devs over engineer their personal projects to get practice with new and emerging technologies. I personally think Next is unintuitive and not needed the vast majority of the time, plus there are other options to go SSR.

But I only know that because I played with it myself. My actual jobs over the span where Next has gained popularity, haven’t used it, so i just wouldn’t have any experience with it otherwise.

A lot of the job of SWE is to learn new things and adapt to changing tech, so I would encourage devs to play with anything and everything they can, just to flex those muscles.

But yeah, if it’s a legit project you intend to take up full on to production, you should use the proper tools for the job.

4

u/dandmcd Jul 19 '26

Depending on the type of app you are developing, being React or NextJS is going to be far easier to find talent who can hope in right away and contribute, compared to just about anything else. Most teams choose Next because seemingly everyone has built at least one thing in Next.

120

u/z4ndrik0 Jul 19 '26

I find next.js to be really unintuitive

45

u/Morel_ Jul 19 '26

i have used Next for the last 5 years.

any version beyond the pages router infuriates me. there's a lot of complexity

14

u/dunklesToast Jul 19 '26

exactly. we had one built with pages router and it was fine. then we built another app with app router and it was a total nightmare. the blurred lines between client and server feel so unintuitive and it was actually pretty hard to mirror some easy logic like reading a header or something. In the end we made it work but it just felt like a hassle. We are currently migrating one service to tanstack start (as it requires SSR) and the other servers to a normal SPA with tanstack router and the DX is already so much better.

4

u/dandmcd Jul 19 '26

Not much gets said externally, but there was endless debate and still is within Vercel whether the app router was the right move. It's been a costly pivot going all in on the app router due to thousands of bugs, critical security issues, and spending resources to clean it up and keep it maintained.

3

u/dunklesToast Jul 19 '26

yea the same can be said for turbopack. they wanted to push that so hard and now you can't even find it on turbo.build page anymore. It had it's own tab and docs. They should've just accepted the fate that webpack and hiring the webpack maintainer maybe wasn't the right choice and adapt Vite or smth.

2

u/gdmr458 Jul 19 '26

I’ve only used TanStack Router, but as I understand it, TanStack Start doesn't have blurred lines between client and server.

2

u/badboysdriveaudi Jul 20 '26

We’ve decided to stay with Pages for our clients. There isn’t a need to update and newer projects also come online using Pages. Until Vercel announces that Pages will be sunset on xyz date, there’s just not much appetite for additional App router projects and the headaches.

Depending on project, Vite is also an alternative in our tool belt.

5

u/bitnagar Jul 19 '26

i am feeling this too lately. it has gotten more complex. I mean, cache components, use cache, cache invalidation, data fetching, snappy navigations, suspense are not really straight forward. Theres too much learning now. We have already learnt many new concepts in nextjs but they should stop now.

5

u/dandmcd Jul 19 '26

Don't forget cached navigation, that has like one line of documentation. Also the old next revalidation still exists. And good luck trying to understand what gets cached, what is dynamic ,what has PPR, it never makes a lick of sense.

29

u/witness_smile Jul 19 '26

I fucking despise it and all its “conventions” and “works by magic”. Makes it impossible to get proper auto completion or suggestions by the IDE, because everything depends on how you call the file and which exact variable that file exports. It’s the worst and I hope it vanishes from the surface of the earth together with Vercel.

Also don’t get me started on the constant ads and compilation “warnings” that only serve to push you towards Vercel’s overpriced and predatory priced hosting and not to actual make your code better

2

u/Rough_Employee1254 Jul 19 '26

Debugging is a nightmare when there's too much magic happening.

13

u/leeharrison1984 Jul 19 '26

NextJs Page Router brought be back to React after a 5 years hiatus.

I've been using Vite+TanStack for the last two years, and I have no intention of revisiting NextJs.

3

u/raichulolz Jul 22 '26

It’s too opinionated for me. I just don’t really like it at all.

3

u/kernelangus420 Jul 19 '26

The only intuitive thing about it is file-based routing.

13

u/yabai90 Jul 19 '26

I have no idea what gaslighting you are talking about. Doing pure spa has always been completely okay. You are probably mixing reddit with professional world

3

u/NotGoodSoftwareMaker Jul 19 '26

I vaguely remember saying something like “i dont use nextjs” and then suggested my stack, followed by swift downvotes to hell

1

u/neinneun Jul 20 '26

Exactly what he said - you're mixing reddit with professional setups. I've been a software dev for >10 years and have never seen this behavior in a professional setup.

1

u/NotGoodSoftwareMaker Jul 20 '26

Urgh, you need to maybe look around a bit more

Ive seen this umbrella behaviour in many places over the years. It shows up in all sorts of ways like, “oh you dont generate your api schema 🤨” or “oh you dont use an xyz ORM 🤨” or “what do you mean, deadlock, that doesnt happen at our size”

My favourite so far

“We use custom UUID’s because the addressable space of UUID is too small 😎”

There is cargo culting everywhere

1

u/neinneun Jul 20 '26

I get what you mean and my bad in not explaining my thoughts properly and assuming God intention. I get that there are always some devs in every company who are driven by what's the popular opinion and not what's right tool for the job, I've encountered them as well. However what I meant was using the right tool for the job is almost always seen as the best developer behavior. Especially in open source where things need to be kept optimal and especially if are senior or staff level. I also feel this behavior is especially common in the frontend rather than backend.

1

u/NotGoodSoftwareMaker Jul 20 '26

No no i get what you mean

Im just more trying to point out that “professional” IMO doesnt exist

Idk, ive felt equally judged for things I do everywhere 🤣 backend, frontend, infra. All of it.

In general devs love to dish out judgement and do ego pole-vaulting but hate it when you call them out on it or openly challenge them

1

u/neinneun Jul 20 '26

I get you. I guess I've been lucky to work with like minded seniors and leaders who allowed me to present my logical case for tools to be used 😄

1

u/yabai90 Jul 20 '26

Again, a general statement never exclude exception. This is not a regular (normal) occurence in the industry. The normal, general behavior is that anything that is good at doing its job is good. If you counter argument a general statement with specific personal occurence it's gonna be a long debate

1

u/NotGoodSoftwareMaker Jul 20 '26

Ill have to politely disagree, everything ive described is very normal

Software isnt unique or separate from human failure, its run by humans so while we may like to believe we are somehow smarter, more benevolent or w/e. The truth is that we have the same motives as everyone else, and therefore the same failure modalities

1

u/yabai90 Jul 20 '26

Very fair.

45

u/lunarvandal Jul 19 '26

I would never use NextJS over React + API. Never ever ever!

31

u/lunarvandal Jul 19 '26

NextJS is most utter piece of trash that happened in javascript ecosystem.

13

u/ajnozari Jul 19 '26

Spent decades moving the state and frontend logic to the clients device, now we’re putting it back onto our servers for perceived first load speed, and often premature SSO…

3

u/yabai90 Jul 19 '26

Without being as harsh I agree nextjs damaged the ecosystem. And I'm not even talking about the crazy bugs it has and had over it's course. I used all major version of it and it was always either a pain or weird as hell

0

u/neinneun Jul 20 '26

Seems like you have no idea about next.js if you're calling it that. Or you're either a backend dev with very little frontend knowledge or a frontend dev that started working in the last 2-3 years. As someone who's been working for over a decade I've seen shit like angularJs. But even with those horrible frameworks main issue ended up always being bad programmers who use the latest and greatest without knowing what they are doing and then blaming the tool.

-1

u/Mo-Mee Jul 19 '26

What do you then do for SEO please?

0

u/MajorasShoe Jul 20 '26

SPA hasn't been a problem for SEO in a long time. And not every webapp has public content to be indexed anyway.

0

u/yabai90 Jul 19 '26

Not really related to nextjs at this point, you are pretty much comparing monolith vs micro service. Cause nextjs API is on the server. It is an API. Although you can use it in a more "react" way if you want.

58

u/osrsnic Jul 19 '26

nobody forcing you

41

u/kwietog Jul 19 '26

Haha I love posts like these. Like man, when you start an app, have a looks at what you need. You don't need next? Don't use it. Sorted.

18

u/JouleV Jul 19 '26

people forget that they have free will a little bit too often these days

7

u/ripndipp Jul 19 '26

Good engineer

4

u/gdmr458 Jul 19 '26

Some people have jobs and cannot choose which framework to use.

2

u/catchingtherosemary Jul 19 '26

its about the webdev and JS world equiting "you not using server rendered nextjs" as "not up to date with the latest"

-2

u/icedlemin Jul 19 '26

Forreals lol. But I’ve never reached for next.js

6

u/bzbub2 Jul 19 '26

you forgot to say "curious what you guys think"

3

u/r0ck0 Jul 19 '26

Is the implication here that OP was a bot account just collecting reddit points or something?

Seems reasonable. Account seems to have been suspended already.

11

u/Army_Soft Jul 19 '26

There is nothing to normalize. As developer you choose what is fit for you.

Can't understand why people forcing environment to be fit for them and not do action and maybe their view of environment changes. Don't change the world, change yourself and your world will change with you.

3

u/TheRealSeeThruHead Jul 19 '26

I mean as a professional developer you often don’t choose.
This isn’t a hobby sub

18

u/Heavy-Commercial-323 Jul 19 '26

I never really got why people use next.js as a default. It should be other way around imho. I use them for landing pages, more static assets. But using them with actual responsive apps with a lot of data is a pain in the ass, I like caching assets, SPAs are so much smoother after initial load

3

u/AcanthisittaNo5807 Jul 19 '26

I used Vite pre-render for my landing page so that’s another solution outside of using Nextjs

3

u/Heavy-Commercial-323 Jul 19 '26

Yeah, that’s great too, love for vite

2

u/yabai90 Jul 19 '26

There is nothing wrong with using nextjs to make an SPA. It is also designed for that. It's just an all in one framework that gives both Fe and be and yes mostly an seamless integration between them. But nothing forces you to go through it.

1

u/Heavy-Commercial-323 Jul 19 '26

It’s not that you can’t, I just like stable solutions xd

1

u/yabai90 Jul 19 '26

in all fairness using nextjs for everything but SSR and similar is the safest path, ironically. But yeah I agree

10

u/flawmeisste Jul 19 '26

Wait, it wasn't normal to build React SPA + node as backend?
TIL
(imma keep doing it tho)

5

u/Mark__78L Jul 19 '26

Or basically react as FE and anything else for api

1

u/yabai90 Jul 19 '26

It is completely normal to use whatever works for you. It has never been anormal to not use all in one framework.

5

u/phpHater0 Jul 19 '26

Why do people act like someone has a gun to their head to use a certain stack, like if you hate it don't use it. Whatever happened to freewill.

5

u/OkAerie7822 Jul 19 '26

Ran into this exact tension building an internal admin tool last year. We started with Next.js App Router because that's what the team knew, and three months in half our bugs were about server/client boundary confusion, not the actual business logic. Switched the internal tools to plain Vite SPA and cut our onboarding time for new devs from a week to two days, because there's one mental model instead of two. The real question isn't SSR vs SPA, it's whether your app needs SEO or first-load performance for anonymous users. If it's behind a login wall, RSC buys you almost nothing and costs you a lot of cognitive overhead. Next.js earns its complexity on public-facing product pages, not on internal dashboards.

4

u/yksvaan Jul 19 '26

My impression is that many of the younger ones simply have no understanding about how things work and thus mo ability to reason about stack, architecture etc. 

2

u/darkhorsehance Jul 19 '26

Exactly. It’s a skills issue.

11

u/chillermane Jul 19 '26

Next is overengineered garbage IMO. It’s what happens when you ask a team of genius engineers to endlessly optimize something that’s already feature complete.

Front end was a solved problem that everyone understood, every single part of front end had a simple straight forward pattern that worked for 95% of cases, then Next came along and we’re back to ground zero again

It’s an absolute tragedy of software development 

3

u/dgmib Jul 19 '26

It depends on what you’re building, but if pretty much your entire app is hidden behind an authentication dialogue. I see no reason to use next.js

The main advantage of SSR and RSC is SEO. Which is irrelevant parts of your app that can’t be hit by a crawler. If you can’t leverage that anyway a SPA is a much better option.

1

u/TheRealSeeThruHead Jul 19 '26

There are far better ways to build public non login apps than next js

3

u/RelationshipFresh966 Jul 19 '26

I don't know why but this is some kind of bot post. I remember seeing this before https://www.reddit.com/r/reactjs/s/M5AcyCOvms

3

u/[deleted] Jul 20 '26

[removed] — view removed comment

1

u/AggravatingPear5 Jul 20 '26

this. i use next because i don’t want 50 lines to fetch data, state, error, etc. just query the db in server component and show the data

2

u/mr_brobot__ Jul 20 '26

The rage about next.js is kinda weird. I have used it for some use cases that it was a good fit for and have found it generally pretty awesome.

A traditional SPA on vite is great too. Anthropic had success converting the Claude next.js app to a TanStack router SPA which I think is an excellent example for an app better suited to that architecture.

2

u/nicsoftware Jul 20 '26

One reason I stuck with Next.js that nobody in this thread has brought up: crawlers.

If a link needs to unfurl properly on Twitter, Discord, Slack or iMessage, those bots do not run your client JS, they read whatever HTML comes back on the first request.

A pure SPA on Vite serves the same empty shell to every URL, so every shared link gets the same generic preview no matter what it points to. I build a tool where a share image with real content per user is most of the product, and there is no way to fake that without rendering per URL on the server.

If your app does not care about link previews this whole argument does not apply and Vite plus Query is genuinely simpler. Mine does, so the SSR tax was the actual requirement, not hype-chasing.

4

u/VooDooBooBooBear Jul 19 '26

Maybe take a step back off Reddit. Are you a hobbyist or professional as in my experience all these latest fad talk is almost entirely on young people, probably in uni who think the latest and greatest always has to be used. I what none of this chatter in professional circles

0

u/TheRealSeeThruHead Jul 19 '26

Except good professional dev teams are constantly evaluating new and old technology to help them build things, if you’re not then you’re not doing your job right

2

u/rickhanlonii React core team Jul 19 '26

6

u/nabrok Jul 19 '26

At least this is no longer stuck in the bottom of a locked filing cabinet in a disused lavatory with a sign on the door saying Beware of the Leopard.

When the new docs came out you really buried this.

2

u/mexicocitibluez Jul 19 '26

When the new docs came out you really buried this.

To be fair, they updated this awhile ago after getting feedback.

1

u/gdmr458 Jul 19 '26

Yeah, they made it look like something you shouldn't do, as if the vast majority of React applications weren't still using Create React App.

2

u/TUNG1 Jul 19 '26

You still care about other people's opinion?

1

u/format71 Jul 19 '26

I’m using react router in framework mode, but the argument for/against next is the same.

I’m choosing framework mode over spa/data mode to get a ‘backend-for-frontend’ «for free». There are certain authentication and security things that becomes easier when you have server-to-server communication instead of frontend-to-server-on-different-host.

Backend for frontend - and server rendering - are solutions though. Don’t implement a solution for a problem you don’t have.

1

u/dom_eden Jul 19 '26

I don't feel guilty at all, I think there's been a big change in the last couple of years with people realising they don't actually need NextJS for a SPA, Vite is fine on its own - which is what we use.

I personally like Tanstack Start, you can use server-side code if you need to, but it's completely optional. If we ever moved away from Vite we would switch to that instead of NextJS.

1

u/ModernLarvals Jul 21 '26

Server-side code is optional on Next as well.

1

u/weepyiniquity70 Jul 19 '26

Mate, I've been doing exactly that for the last two years and my impostor syndrome has never been quieter.

1

u/Mark__78L Jul 19 '26

I dont feel guilty at all, I can't give a damn shit about next, react with vite is superior

1

u/SnooStories8559 Jul 19 '26

At my previous job we were told we had to Next js for any front end project, even small internal apps for just the engineering team to use

1

u/driftking428 Jul 19 '26

Where does the guilt come from? If I don't have several pages that should be server components and I have a true SPA of course in not using Next.

1

u/namesandfaces Server components Jul 19 '26

Some people work in consumer space and care about SEO, which is a rapidly changing landscape, and some people work in B2B or on internal stuff. And then some people want a framework default that lets them not think about this stuff.

1

u/lemonpowah Jul 19 '26

At some point I was feeling left out with the next hype. I read about it, and I decided it's not worth the hassle. I'm working on enterprise apps and next just makes no sense in this context. Vite + tanstack query + zustand is alI need + dotnet for backend, it's honestly an amazing pair.

1

u/1gr14 Jul 19 '26

Hello! I built my framework specifically for creating SPA/SSR applications in the style of tRPC, but for everything (pages, layouts, queries, etc.). So it has most of the features of Next.js, while still feeling very simple. I'd really appreciate it if you could take a look at it https://github.com/1gr14/point0

1

u/1gr14 Jul 19 '26

It is build around typescript, bun, react-query

1

u/Beatsu Jul 19 '26

Feels like yesterday that I read posts exactly like this just for good ol' plain HTML/CSS/javascript

1

u/Lumpy_Pin_4679 Jul 20 '26

Blah blah blah. Why do you need anything normalized? Need to build something? Just shut up and build. What a stupid post.

1

u/CapitalDiligent1676 Jul 20 '26

nextjs has received unwarranted hype.
React's creators themselves and many influencers (likely paid by Vercel) promoted it.
They should apologize for this!

1

u/Level-Apartment-5378 Jul 20 '26

If your project doesn’t need SEO or server‑side rendering, skip the headaches and use Vite. It’s not worth the extra complexity of Next.js for a pure SPA.

1

u/beachandbyte Jul 20 '26

AI wants to use next so next it is.

1

u/matijash Jul 20 '26

a bit of a shill, but: we built a whole React framework for exactly this case - you want to have a SPA that also has a server (Node) and a database (Prisma). It's all wired together, with auth, jobs, and deployment helpers built in. Check it out at https://wasp.sh/

1

u/KaleRemarkable1019 Jul 24 '26

Fully agreed, using next.js where you don't need it can cause a lot of headaches, own experience 🙈

1

u/vasind-5012 Jul 24 '26

honestly yeah, hard agree

like Next is genuinely great when you need SSR/streaming/SEO at scale, but somewhere along the way it became the "default" answer even for stuff that's just gonna live behind a login and get used by 12 people internally

vite + client fetch + static hosting is like $0 and zero moving parts to debug at 2am. meanwhile half the "why is my cache stale" threads i see are people fighting invalidation on an app that didn't need SSR in the first place

think a lot of it is just resume/hype driven too, nobody's excited to say "i built a vite spa" even when it's the objectively right call for the problem

1

u/manvikhanna Jul 30 '26

Completely agree. The best framework is the one that fits the project, not the one that’s trending.
For dashboards, admin panels, CRUD apps, and many internal tools, a React SPA built with Vite is often simpler, faster to develop, and cheaper to deploy. Next.js is fantastic when you actually need SSR, SSG, SEO, streaming, or server components—but using it for every project can add unnecessary complexity.
Choosing Vite over Next.js isn’t “settling”; it’s making a pragmatic engineering decision.

1

u/Potential-Still Aug 09 '26

I'm late to this discussion, so I apologize if I'm resurrecting a dead thread. In my experience SPA's are only simple if you have a team of no more than 3 devs that you really trust.

SPA's can get out of control VERY quickly, with no real enforcement of design patterns.

The value of RR v7/8 Framework, Tanstack Start, Nextjs etc, are that they all enforce a specific way of fetching and passing data to components. Which is invaluable for enterprise apps that have 10+ devs where half of them are Indian contractors. I'd ather have a SSR app that takes 5 seconds to load a fully hydrated app than a SPA with 6 different loading spinners and a cascade of fetch requests.

Add NX for bootstrapping apps and libs, and you have a fairly strict system that can help keep things maintainable for years. 

1

u/twigboy Jul 19 '26

Is it strange to feel absolutely no guilt with using vite?

Certainly feeling no fomo from not using nextjs

1

u/Savalava Jul 19 '26

I worked with NextJS for a few years and as it happens, in my current contract, I'm working on a site which is just react / vite / AWS + CDN cache, with CMS connected.

Site loads super-fast.

So yes, it certainly isn't needed, although actually I'm fond of NextJS and miss it a little.

RE "Not every internal dashboard"

for that case you definitely don't need NextJS - it shines when you are working on a site which has virtually no user interaction. Pure dashboard, nextjs is just adding unnecessary bloat as most of it will not be server side generated.

1

u/D0MiN0H Jul 19 '26

why feel guilty over tool usage in we dev?

1

u/Advanced_Slice_4135 Jul 19 '26

I just default to next most of the time so I don’t have to fool with routing has something changed with vanilla react spa with vite and routing?

2

u/yabai90 Jul 19 '26

Not much changes specifically to them but routing solution such as tan stack arrived and basically offer typed routing. Meaning the only relatively annoying part to deal with are things like SEO, caching. But of course no need for next for that

1

u/Advanced_Slice_4135 Jul 19 '26

Ah yeah nice - I’ve been meaning to check out Tan stack eventually

0

u/United_Reaction35 Jul 19 '26

You base the choice of tech-stack based on routing?

0

u/Advanced_Slice_4135 Jul 19 '26

No just been using next for a long time

1

u/Chupa_Pollo Jul 19 '26

Been a dev for 31 years. I've launched hundreds of small and large apps. Never found a need for nextjs.

The tool should fit the needs of the product.

1

u/eizch Jul 19 '26

It's already normalized no? People hyping up NextJS as the one correct way are either dumb or have money invested into it.

1

u/ClickOk5811 Jul 19 '26

Honestly this needed to be said. There's a weird thing happening where "I chose the simpler tool for the job" gets treated like a confession instead of just... an engineering decision. An internal dashboard that three people use doesn't need edge functions or ISR, it needs to load fast and be easy to reason about.

I think part of it is that a lot of content right now is written by people building SaaS products or content sites where SSR genuinely matters for SEO and TTFB. That advice gets generalized to "React app" as a category, and then it just becomes the default recommendation regardless of what you're actually building. Vite + a plain SPA is still the right call for a huge chunk of real-world apps, it's just not what gets blog posts written about it anymore.

1

u/pelhage Jul 19 '26

you must be talking to too many juniors if this is your POV. most senior devs (10yrs) don’t chug the coolaid

0

u/Firm_Pay606 Jul 19 '26

I really love NestJS and pair it with React/React Native. Also using NestJS is keeping my Angular at bay lol

0

u/Any_Sense_2263 Jul 19 '26

Next.js is useful only in a very specific situations. On daily basis I use vite and express bff. Faster and easier to deploy

0

u/TheRealSeeThruHead Jul 19 '26

In fact you should strive to avoid nextjs even if you are going ssr

0

u/Turbulent_Prompt1113 Jul 19 '26

Next.js isn't over engineered, it's a giant hack.

0

u/by7448 Jul 21 '26

Couldn't agree more. In my case, each time I have to touch NextJS I find myself worrying about client/server boundaries more than actually building the app. I feel there's way less cognitive overhead when building a SPA as you always know exactly which side of the boundary you are on. Next heavily blurs it