DEV Community

Cover image for Why I won't use Next.js anymore 😡
Royal Jain for CodeParrot

Posted on

Why I won't use Next.js anymore 😡

Warning: Rant ahead.

When NextJs first became popular, it was a remarkably easy way to build full stack application and soon became the my default choice. But after using it for years, I have decided to move away from it.

Problems

It has become too complex

Over time NextJs has introduced tons of complexity, with latest one being Server Actions. Learning curve is much higher now and going through NextJs documentation has become a herculean task. USP of simplicity is gone.

Too many breaking changes

Page router to app router has created so many problems. Like API level configs don't work anymore and now we need to learn about Server Actions to achieve this.

Customisation

Any use case which differs from what NextJs creators intended to do is simply painful. NextJs has decided that API requests can have 1Mb request body, I have an API which uses request body of > 1 Mb (passing a base64 image), achieving that has no good alternative.

Page router has some config options but app router doesn't or they are not documented. The only way to achieve it is either create a custom server (What's the point of NextJs then) or learn about Server Actions, which may or may not provide a solution.

At this point, you start wondering what was the problem with the simple express server.

My Conclusion

Any highly opinionated framework should be simple to work with, nobody wants something which is restrictive and needs a high learning curve. The only use cases someone should consider using NextJs is

  • Extreme need for Server Side Rendering
  • Hobby project with known and simple scope

Top comments (10)

Collapse
 
zendyani profile image
Abdeldjalil

I get what you mean about it being complex. While I won't say I hate it, there are simpler options that can do the job just as well. Personally, I prefer using Fastify for APIs. As for the front end, it really depends on how complex the project is and how long it's going to last.

Collapse
 
mitch1009 profile image
Mitch Chimwemwe Chanza • Edited

But why on earth will you be passing a base64 string in a payload? you can use cdn or image storage resources all over the globe like firebase storage or azure blob o AWS let alone alibaba then you get a url to the image and implement whatever logic you want.

Collapse
 
sakshamverma profile image
SAKSHAM VERMA

It's valid to express concerns and challenges faced with any framework or tool, including Next.js. However, it's important to note that opinions about a framework can vary based on individual experiences and project requirements.

For many developers, especially those working on projects with common requirements, Next.js continues to offer a straightforward and efficient way to build React applications. The simplicity of creating server-rendered pages, automatic code splitting, and easy deployment with features like next export can significantly benefit projects with standard needs.

While it's true that Next.js introduces new features over time, many of these are optional and can be incrementally adopted based on project requirements. Features like Server Actions might not be necessary for every project, and developers can choose to use them as needed, maintaining simplicity for smaller projects.

Despite the perceived limitations, Next.js provides a fair degree of flexibility in configuration. Developers can customize webpack configurations, use middleware, and even extend or override default behaviors. This allows for tailoring the framework to specific project needs.

Ultimately, the choice of a framework depends on the specific needs of a project, the preferences of the development team, and the long-term goals of the application. It's essential to consider both the positive aspects and challenges of any technology before making a decision.

Collapse
 
carloslsilva profile image
Carlos Silva

Next js it' cool, but I agree with you, it is becoming dark, perhaps difficult to use, I don't know if it is a question of adapting to the changes.

I'm liking Astro to be the next battlehorse

Collapse
 
bjoentrepreneur profile image
Bjoern

Interesting. I was and still am super happy with nextjs, especially in connection with vercel. What is your alternative now?

Collapse
 
royaljain profile image
Royal Jain

Going back to basics: Express + React for WebApps.

For landing pages where SEO ( and thus SSR is high priority) I'll give Astro a try

Collapse
 
bjoentrepreneur profile image
Bjoern

OMG. Just heard from Astro the first time. It sounds amazing! Thanks for sharing :)

Thread Thread
 
ademagic profile image
Miko

Astro is fantastic and the community is great. Highly recommended!

Thread Thread
 
bjoentrepreneur profile image
Bjoern

I will 100% check it out. I liked Gatsby back then a lot, because of their focus on the static part, and they seem like Gatsby ++

Collapse
 
mitch1009 profile image
Mitch Chimwemwe Chanza

Good luck with that 🚀