top | item 43884416

(no title)

WuxiFingerHold | 10 months ago

NextJS has a lot of significant drawbacks, that's why there's an ongoing debate (which is healthy):

- Cost

- Complexity

- Learning curve

- Scalability

- Frequent changes

- And surprisingly bad performance compared with the direct competitors

Nowadays, NextJS is rarely the best tool for the job. Next and React are sitting in the "never got fired for buying IBM" spot. It is a well earned position, as both had a huge innovational impact.

Do you need best in class loading and SEO with some interactivity later on? Astro with islands. Vitepress does something similar.

Do you need a scalable, cost efficient and robust stack and have moderate interactivity? Traditional SSR (RoR, Django, .NET MVC, whatever) with maybe some HTMX.

Do you have a highly interactive app? Fast SPA like Svelte, Solid or Vue.

discuss

order

littlecranky67|10 months ago

I challenge the "Bad performance" part.

NextJS generates by default all assets and js-chunks with a sha256 hash in the filename - essentially making them immutable. As outlined in the NextJS, I serve my assets folder with `Cache-Control: public, max-age=604800, immutable`. In a webapp where your users use your app on a semi-daily basis that means all assets and resources will be cache forever, or until you re-deploy a new version of the app. The data comes via REST (in whatever backend-language you want to use) so I don't see how any SSR can outperform nextjs here.

robertoandred|10 months ago

Cost? NextJS is free, and can be hosted on free services like GitHub/Cloudflare Pages.