VOOZH about

URL: https://thenewstack.io/next-js-react-router-tanstack-when-to-use-each/

⇱ Next.js, React Router, TanStack: When To Use Each - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2025-08-07 06:00:02
Next.js, React Router, TanStack: When To Use Each
Frontend Development / JavaScript

Next.js, React Router, TanStack: When To Use Each

Yes, the framework you choose matters — although not too much. Here's how one coder would use Next.js, TanStack Start and React Router v.7.
Aug 7th, 2025 6:00am by Loraine Lawson
👁 Featued image for: Next.js, React Router, TanStack: When To Use Each
Image via GitNation screenshot.

Are all frameworks the same? Not exactly, according to developer and educator Ankita Kulkarni.

Kulkarni compared TanStack Start, React Router v7 and Next.js, identifying the best uses for each. She presented her findings at React Summit 2025 (free registration required), which was hosted by GitNation in June. The video of the presentation was released late last month.

What’s particularly interesting about her presentation is that she didn’t just compare the frameworks; she suggested the particular situations where each JavaScript framework excelled.

Next.js

What makes Next.js special, according to Kulkarni, is that it provides an easy way to integrate search engine optimization (SEO).

“We get a serverless platform out of the box,” she said. “We have different data fetching mechanisms.”

This makes it ideal for e-commerce sites, marketing sites, landing pages, SaaS dashboards, blogs and documentation sites, she said. She added that it’s good for serving a lot of static content, or even hybrid content, meaning dynamic as well as static content. (Note: many industry experts would disagree it’s suitable for blogs or other simple content sites, due to the complexity of React-based frameworks.)

The Next.js ecosystem is superior compared to other frameworks, she said, but the learning curve is a bit steeper. For example, developers have to learn two different types of routers with Next.js: App router and Pages router, which is a legacy offering. It’s also complicated by server actions, server components, different behaviors and versions, and different rendering methods. “There’s definitely a steep learning curve here,” she said.

She noted that Next.js “has come a really long way” in terms of developer experience.

Next.js has also embraced React Server Components (RSCs) early, “giving us a glimpse into what full-stack React could look like before most frameworks were ready,” she said.

Kulkarni recommends choosing Next.js when you:

  • Want built-in optimization or to use server components (RSC).
  • Need granular caching controls.
  • Have no custom webpack builds.
  • Want wide adoption and community support.

React Router v7

React Router v7 became a framework when the core features of Remix were merged into React Router v7‘s framework mode.

What sets it apart is it bets on web standards, she said.

“What it does is it unifies the client and server with web standards, so you can think less about your code and more about your product,” she told audiences. “Whenever you try to Google anything — for example, a form component — you can straight up go to the MDN docs to look for how the APIs are going to look. They’re going to lean on web APIs directly, instead of adding a wrapper on top of a form component that a lot of other frameworks do.”

React Router v7, as a framework, also incorporates the flexibility of using React Router, she added. This makes it easy to create a standard CDN-hosted (content delivery network) single-page application (SPA). A web developer could easily migrate that and add server-side rendering hosted on any server, she said, adding, “That’s the beauty of it.”

React Router and Tanstack use Vite for the build system, which is incredibly fast, she added.

“Because both of them use Vite, it’s already a good start” for developer experience, she said. Vite uses a plugin-based system that makes it easy to add functionality. “You can think of it as Lego boxes that you can pick and choose from,” she said.

Where React Router can slow developers down is that it’s tightly coupled with web standards, so it can get a little tricky because of the tight coupling, she said.

“You have to make a lot of decisions here whenever you go with React Router and overall, it’s just the experience is better,” she said.

Choose React Router v7 when you:

  • Care about progressive enhancements, web standards and ALLY (at least in a React context).
  • Want deep nested routing.
  • Want no limitations for integration to cloud platform.

TanStack Start

TanStack Start is a full-stack React framework powered by TanStack Router and supported by an ecosystem of TanStack tools.

“What makes TanStack really special is that it’s fully typed,” Kulkarni said. “I can’t remember the number of times I have changed routes in other frameworks and everything breaks, and I have no idea a lot of times what’s working and what’s not.”

TanStack will help with that because it’s fully typed, she added. It also has isomorphic loaders, which means loaders that run on the server initially, then on the client for client-side navigations. TanStack also offers server functions, which make it easier to make server-based calls, she added. It comes with React Query integration, so it can be used right out of the box.

Kulkarni discussed building a SaaS application. For the dashboard interactivity, she would need lot of client rendering, she said. For that, TanStack is “really powerful and useful.”

In particular, she had a bubble with a lot of interactivity on the page.

“In this case, maybe I could have used Next.js or React Router, but ideally, TanStack is the best contender for this one,” she said. “Because this is a client-heavy application, it will have a lot of caching, a lot of changes that TanStack Start is just going to manage.”

For any type of interactive dashboards, admin panels, and so on, TanStack is a great start, she said.

However, TanStack Start is not ideal if the frontend developer’s goal is a server-rendered site with zero JavaScript or minimal client-side interactivity, or the developer wants an RSC framework — although she added that support for RSC is coming soon.

She also noted that TanStack Start is still in beta.

“It’s already so powerful, so I cannot even imagine how powerful it would be after its full release,” she said.

Choose TanStack Start when you:

  • Already use React Query/TanStack Router.
  • Have the client heavy apps.
  • Need streaming + SSR without complex abstractions.

The slides for her presentation are available for free viewing, although this seems to be an older version of the presentation because, instead of TanStack, it offers an evaluation of Astro.

Editor’s Note: Updated Aug. 22 to link to the correct slide presentation, which was recently published.

TRENDING STORIES
Loraine Lawson is a veteran technology reporter who has covered technology issues from data integration to security for 25 years. Before joining The New Stack, she served as the editor of the banking technology site Bank Automation News. She has...
Read more from Loraine Lawson
SHARE THIS STORY
TRENDING STORIES
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.