Why I love Next.js

May 19, 2025 (1y ago)

Most of my apps are built on Next.js. You might be wondering why I use Next.js in an era with so many other options available in a crowded ecosystem, especially in the massive JavaScript landscape. I have a couple of reasons why I am a big fan of Next.js and why I think that you should also use it.

Built on React

React is something that I used to use every day, often paired with Vite. Since I already knew React, migrating to Next.js was a cakewalk. It provided file-based routing, server-side rendering, and static site generation right out of the box. I didn't have to configure a lot of stuff, which made the transition incredibly easy.

SEO-Friendly by Default

By default, I didn't have to worry about React being rendered on the client because the majority of components I write in Next.js are rendered on the server side. This was really great because search engines rank server-rendered pages much higher. Next.js natively supports SSR and SSG, meaning my content can be served as plain HTML.

I had two massive wins here: better SEO and a much faster Time to First Paint or First Contentful Paint.

Server Actions and API Routes

Another feature I really enjoyed was Next.js Server Actions and API routes. Instead of maintaining a separate client repository and server repository like in a classic MERN stack app, I could handle everything in the same place. I just had to write it in the /api directory or use Server Actions. Doing everything in the same repo was a really huge advantage for me.

Out of the Box Performance

Next.js comes with out-of-the-box performance optimizations. It features automatic code splitting and smart image optimization with next/image. Because of this, I noticed that my pages loaded much faster, the bundle sizes were significantly smaller, and my Lighthouse scores immediately improved.

Deployed in Seconds

Next.js is made by the creators of Vercel. This made it incredibly easy in terms of deployment. Figuring out all the environment variables, managing production instances, or deploying it straight from the CLI was seamless. It literally just took one command line to deploy:

npx vercel

Done.

Next.js takes the best parts of React and makes them easier, faster, and more powerful. If you're new to it, give it a try. You might find that it makes your development process much faster and the overall developer experience? You tell me.