r/reactjs • u/nunomaduro • May 08 '26
Show /r/reactjs why react developers are leaving next js for tanstack
https://youtu.be/6moPS3AAbe4?si=4oFMkNdM9BRlUcvnhi everyone,
just released an interview i did with tanner linsley, creator of tanstack
we discussed tanstack start, tanstack vs next.js, why next.js can feel too magical, react server components, typescript inference, framework-agnostic ui, vue support, tanstack ai, and whether tanstack could ever become something like laravel or rails
would love to hear what you think
133
Upvotes
115
u/EuropeanLord May 08 '26
I’m so happy I don’t have to do any SSR and never used Next or Tanstack much, managed even to miss the Gatsby train… Everyone was so pumped about it but I tried Gatsby a few times and found it to be one of the worst experiences of my life. Same with “hydration” and all the other bs.
Really grateful :)))
31
u/lenymo May 08 '26
Astro is another really good option
18
u/gbitten May 08 '26
Maybe because Vite? <thinking out loud>
14
u/Scientist_ShadySide May 08 '26
I just completed a major nextjs project in the past year and was just starting on a new one when Tanstack Start when RC. Pivoted early and have swapped to Tanstack Start. Of course still too early to say, but I've been enjoying the different approach compared to nextjs.
31
u/CodeAndBiscuits May 08 '26
Funny, I'm personally a big fan of most of the Tanstack suite, and have not been a fan of NextJS for some time. But lately I've gone the opposite way. Tanstack Start is kind of a big investment IMO in the same way tRPC is: lots of cool tricks and features, but it's a bit specialized, not always applicable to every need, and takes time to learn to use/maintain well. Meanwhile, NextJS is so endemic that it's one of those "nobody got fired for choosing..." type things. It's possible we're seeing a VHS-Betamax battle and I'm not convinced Start will win this one.
Caveat: These selections can't be made in a vacuum. Every project is different and over-generalized answers on what is best for all cases just aren't valuable IMO. I am a full-time consultant who focuses on quick builds of POC/MVP apps for startups who need to launch and validate a concept quickly and on a budget. Hidden underneath, that is the fact that when my phase is done, I am nearly always handing off the project to an internal or outsourced team to take over the long-term enhancement and maintenance. In my trade, it is a big advantage to write "unsurprising code" like idiomatic React syntax rather than patterns that follow my own opinions. This gives the highest chance that the team that will eventually own the product will have a smooth transition and be able to maintain these apps with high confidence. I generally tend to stick with the top one or two selections in each category and while Tanstack Start is growing in popularity it is still on the early side of the adoption curve. Next, Vite+React SPA, and similar are still the go-to choices here for now, at least for this need.
3
u/deep_fucking_magick May 08 '26
I'ma skip this one and wait for the next
3
u/yksvaan May 09 '26
One of core issues is treating React as an application/fullstack foundation instead of... UI library.
14
u/lost12487 May 08 '26
Lots of my apps running on NextJS in production. Waste of time to reconfigure them all to Tanstack Start, likely having to completely redo my infrastructure in the process. You don’t have to chase every latest trend.
4
u/Much-Log-187 May 08 '26
Wrong alternative. Wasting too much time on useless magical frameworks. Vite is the only real way.
2
u/Darkoplax May 08 '26
yea my new apps are in tanstack but the company apps and my old apps are nextjs and i aint spending anytime to migrate those cause thats a waste of time
maybe in 10 years from now most of my apps could be tanstack but who knows by then
1
u/Timely-Coffee-6408 May 09 '26
Astro
1
u/saito200 May 10 '26
next.js has too many things that can create overhead and 99% of devs will never need, it feels like dev masturbation. also i hate the directives "use client" and such. in my last next.js project I found myself having to clearly separate client code from server code from isomorphic code
like, you know, the thing you get if you simply have a monorepo with frontend and backend
because having code that can only execute on the client and code that can only execute on the server, two completely different execution environments, all mixed up was too confusing for me. And it does not make sense
what 99% of websites want is a static website with some reactive widgets here and there and can fetch data and be stateful. NOT SSR. Most websites should NOT use SSR, and should in fact actively try to not use SSR unless it is absolutely needed
I switched to Astro and the first impression I got is. "how is this so easy??". Also with Astro I can use Vue instead of React. I prefer Vue because it makes it harder to do mistakes. And I prefer to have a compiled framework that a "it's just javascript" framework / library. I objectively think Vue is better than React
What I have now:
- clearly separate backend and frontend
- frontend: astro + vue, statically generated. Nothing executes in the server at request time just to deliver the html, as it should be for 99% of sites. Any reactivity happens in the client only
- backend: hono (more typescript native than express)
I have seen sites with static content that almost never changes being SSR, delivered by web agencies
1
u/Annual_Manner_8654 May 10 '26
I've been very happy with Deno Fresh. Anyone using it?
1
u/Affectionate-Job8651 May 10 '26
I use Next.js for employment opportunities, and TanStack Start for personal projects
1
u/_Feyton_ May 11 '26
I wish nextjs wasn't this often a subject on a reactjs sub. Next doesn't interest me in the slightest
1
u/AlphaCentauri_The2nd May 08 '26
React and Next.js both work great, no need to change to yet another framework
1
u/AngryPBJ May 08 '26
Why is Will Buxton commenting on Next.js
0
u/incubated May 09 '26
tanstack is one of the worst things to happen to the react community. it forces its own restrictions on you that are influenced by other frameworks which it chose to support for some reason.
-2
u/NotGoodSoftwareMaker May 08 '26
The tanstack query is nice, still need to look into it for just network preservation and caching certain requests
But on paper seems good
0
u/[deleted] May 08 '26
[deleted] — view deleted comment