All posts
TechnologySoftware

Will TanStack Start take over Next.js?

Davi Bezerra3 min read
TanStack Start vs Next.js

TanStack Start vs Next.js

Intro

Next.js has been dominating the market for quite some time when it comes to full-stack frameworks focused on React. And, in my opinion, it is excellent at everything it sets out to do.

Comprehensive and easy-to-understand documentation, a huge community, and Vercel "supporting" the whole ecosystem. The latter, however, does raise a question mark for some users.

According to reports I came across online (Reddit and X), when you use a Next.js app outside the Vercel ecosystem, some Next.js features can become more difficult to operate and configure when you move away from a platform like Vercel.

I've built several applications using Next.js. Some of them are deployed on Vercel, while a large portion of them run on my own infrastructure. Based on my experience working with it, I've never really encountered major problems running Next.js on my own infrastructure. In fact, it has worked very well for me. I don't know whether my experience is influenced by the type of applications I usually build with Next.js (generally frontends that consume a separate backend), or whether this criticism regarding infrastructure simply doesn't make much sense.

Whether there is any truth to it or not, Next.js has gained a "competitor" worthy of attention. TanStack Start (which already had several great libraries in its ecosystem) emerged as a full-stack alternative for React, built on top of TanStack Router. I've used it to build my professional portfolio as well as a few client websites. Below, I'll share a brief overview of my experience with it so far.

First Impressions

Like any modern framework, there isn't much mystery involved in getting started. You run a command, answer a few questions, and that's it: your project is ready. You can even choose a specific template that already comes with a few pages configured, such as a portfolio, for example.

There is, however, one detail here that, in my opinion, is one of TanStack's biggest differentiators. You can choose between several runtimes and deployment providers for your application: Cloudflare Workers, Netlify, Vercel, GitHub Pages, Agnostic, and others. This already makes one of the goals of TanStack Start quite clear: allowing your application to adapt to different providers and runtimes without being so tightly coupled to a specific platform.

The Differentiator

TanStack Start covers a very large portion of the functionality we would normally expect from a full-stack framework for React. You can see the detailed comparison here.

And perhaps this is one of the biggest conceptual differences between the two: while Next.js has an application model strongly integrated with its App Router and the Server Components model, TanStack Start is built on top of TanStack Router. This means concepts such as loaders, typed search params, route context, and type-safe navigation play a much more central role in the application's architecture.

As I mentioned in the introduction, I tend to use Next.js and TanStack for simpler, frontend-focused applications. So, in most cases, the heavier processing is handled by a separate backend. However, I make heavy use of SSR and RSC in my Next.js applications to minimize the amount of processing performed in the client's browser. Given this use case, I haven't seen significant advantages in TanStack over Next.js that would justify replacing my entire stack and the years of experience I've built with a new framework.

Disclaimer

RSC is not enabled by default in TanStack Start. Support for this feature is currently experimental.

Conclusion

In my opinion, unless TanStack Start does something significantly different from Next.js, such as offering a unique feature or capability, there isn't much justification for switching from one to the other right now. Switching technologies means spending more time adapting, learning a new framework (although TanStack is very easy to understand and get started with), and making additional adjustments.

So, answering the initial question: today, I don't see TanStack Start taking the place of Next.js anytime soon. At least not for my use case.

That doesn't mean TanStack Start is inferior. Quite the opposite: for applications that benefit significantly from TanStack Router, loaders, typed search params, server functions, and an architecture that is less tightly coupled to the deployment provider, it can be a very interesting choice.

Will the new framework TanStack Start take over Next.js? | Davi Bezerra - Blog