Ask HN: Have you abandoned Next.js for another front end framework/library?
I'm starting a new project as a technical lead. The last React app I built from scratch was as a freelancer using Next.js. Generally my experience with Next.js has been positive, but while I can still debate my options I'm wondering if anyone has run into problems that caused you to move away from Next.js? And if so can you please tell me about them.
30 comments
[ 2.6 ms ] story [ 92.3 ms ] threadBut I'd rather ask around while I have the chance before committing a ton of code.
Next can still be very flexible, with things like catch-all routes, you could even add another router on top of Next. It also supports customizing the Webpack configuration if needed, but there's plugins for almost all cases that I have needed to use (PWA/service worker, CSS/Sass which is now built-in, etc).
I think Next is one of the safer option for new projects.
For example, I picked up Elixir (which I currently make money using) by rewriting a Rails app into Phoenix four years ago. That app never made me any money, but it did provide a great motivation for learning Elixir!
Similarly, I'm learning Rust now. I'm going through books and videos, building toy projects and slowly picking it up. I've never been paid to write Rust, but that will likely change in the future.
Other languages, like Racket and 8088 assembly I've never been paid to write and likely never will but I don't regret exploring them a bit.
No way. Take as an example one of the most used JS libraries in history (jQuery): released in 2006, and it has been already 4 years or so that it's been slowly substituted by React/Vue/Angular. So, jQuery has had around 10 years of solid development and usage. Saying that Next.js will have between 5 and 10 years of live, it's not realistic (perhaps React will, but Next is going to be dead in 2 years when yet another framework appears that is better/faster/smaller/more featured).
I don't think this is the case? We were looking to add React Router (to add client side routing). And the only way that seemed achievable was by hacking around (https://dev.to/toomuchdesign/next-js-react-router-2kl8)
It does come with a lot of preoptimizations that may not be necessary for the job (as the job is currently defined), but the thoughtful way they're implemented makes having them in there anyway not all that costly. The directory based build stuff that auto code splits, does SSR, and static site generation is high value with a very low learning curve. Not only does it not require a lot of load on the meat to use the bazooka of Next for an anthill of a problem, but it also doesn't really add any load on the metal. And the fact that these features do a great job of covering your ass should business demands pivot under you makes Next a rare kind of contender.
It's a bad choice if all you need is some small piece of an already-existent architecture, but if you need something as the main frontend body for a long-lived app, I've found Next to be the best thing I've ever used by a significant amount.
TLDR; For large projects that must make use of the React ecosystem I'd take Next. For smaller SPA projects I prefer svelte.
[0] https://svelte.dev/
It's worked out very well for us.
Application framework that gain good popularity stay alive for very long. Look at a lot of PHP frameworks for example.
Next will be alive in 5 years
Next is not like Laravel.
Laravel livewire/phoenix liveview.
Anyone know how these compare w/ nextjs/nuxtjs in terms of performance?
However, if you're doing things that require a trip to the server anyway, such as navigation, form validations, etc, you should get significantly better performance with LiveView. Sending tiny diffs over web sockets is a lot lighter than doing JSON requests.