Back to Blogs

The Battle of the JavaScript Frameworks

The Battle of the JavaScript Frameworks

Right now, I’m struggling to decide which framework I want to master and deeply learn to build web apps with. My current options are TanStack, React Router 7, and Next.js. I know there are other great frameworks, but I believe these will be among the most widely used. Could I be wrong? Of course. I hope this doesn’t age badly, but I see React Router 7 emerging as the clear winner.

Why do I say this? Because React Router was one of the first widely used React libraries, and it became foundational in the React ecosystem. As of the time of this writing, there are 7.8 million projects on GitHub using React Router version 6.* or older. Not all of those projects are likely to be in active use by enterprise or business apps, but let’s assume that even just 1 million are. That’s a large enough number to bet your salary on. I mean it. My prediction is that if you’re looking for employment in the React space, you’re likely to get hired by a company implementing React Router in their project.

This is the main selling point of React Router for me: wider job opportunities and knowledge that won’t go to waste. React Router 7 is now being pitched as a full-stack framework, evolving from just a client-side routing library. All those companies with legacy enterprise projects can now more easily upgrade to modern technologies that offer better features, security, architectural design, and performance.

That said, betting against Vercel and its Next.js framework is a steep challenge. Vercel and Next.js are likely the most widely used React frameworks right now. The community is huge. Even when reading documentation from other libraries, they often show you how to integrate them with Next.js. If you can’t solve an issue on your own, you’ll most likely find a solution explained using Next.js.

So, why not just stick with Next.js? Well, for one, it’s very tied to hosting on Vercel. This has sparked a big debate online (cue the Twitter fingers). Yes, you can host it on your own server, but you lose many features that are only available on Vercel’s hosting architecture. Good luck trying to make all of that work on your own hosting.

On the other hand, React Router 7 allows you to host anywhere you want. Did I mention it’s also a Vite.js plugin? Here’s my second strong opinion: of all the bundlers out there, I think Vite.js is the clear winner. For me, if your framework doesn’t work with Vite.js, I’m unlikely to use it. Look at the current JavaScript ecosystem—nearly everyone is building their frameworks to be compatible with Vite.js. This isn’t just my opinion; check it out yourself. You can currently use Remix.js, SvelteKit, Solid, Astro, SolidStart, TanStack, Nuxt, and more. And that’s not even mentioning the JavaScript libraries.

Now, if Next.js ever makes the switch to Vite.js, well, that will be the day I throw up the white flag and surrender. Yes, the hosting issue will remain, but if they integrate with the most popular JavaScript bundler, Vite.js, it will guarantee their victory.
Right now is an exciting time for JavaScript. I have to thank all these brilliant minds who enable us to feed our families with their open-source projects. Take care, and choose your tech wisely.