5 comments

[ 3.0 ms ] story [ 25.5 ms ] thread
Unfortunately I will have to move a significant codebase out of Next.js to perhaps Remix as I run into all mentioned points.
> Unfortunately

This is not unfortunate. I've done this recently and I'm so glad I did. Remix is much, much, much simpler and pragmatic. And doesn't have all these artificial limitations Next.js has when you're running it on your own server. I can't recommend it enough.

It's unfortunate as this will take a lot of dev time from a well running project on the page router. Remix certainly looks good, I've done a small project with it and like how actions and loaders work. But it's also less polished and has a smaller community. For instance a relative simple thing as running Remix from a subfolder was overly complicated. There is also no guarantee Remix won't pull a 180 like Next.js did. The devs have a history of breaking changes with React Router.
Yes, this is true for any js framework (and most libraries) to be honest.

If you want something “safe”, nowadays the only option is to use one of the big MVC frameworks (django, laravel, rails, etc...) with inertia.js, if you want to use React or Vue.

> Just, why?

Next.js is marketed as a super cool framework you can just install and run anywhere, and while that's mostly true... it has a lot of limitations and architectural decisions which make sens only on their hosting platform, but if you're running it on a different platform or your own servers, those limitations make no sense and feel super artificial, even if those are good trade offs for their "serverless" platform.

So everything mentioned in this post, plus all the shady behaviours I've noticed from them have driven me away from it, I'm so happy I did.

Some of the things I'm talking about:

* Middleware runtime artificial limitations because that would make it more difficult to move to their platform later. They don't even respond anymore in the issue: https://github.com/vercel/next.js/discussions/46722

* They refuse to add a config file option to disable the telemetry. Yes, you can do the env var or run the npm script, but they're betting on people forgetting to do it on every project, on every computer and on every server/environment they deploy to. A single boolean config would disable it everywhere, but they won't do it: https://github.com/vercel/next.js/issues/8851#issuecomment-9...

If you still choose to use it just because "it's the most popular one", then good for you. I prefer to make different trade offs.

In my own opinion, that's why.