←back to thread

Next.js is infuriating

(blog.meca.sh)
1033 points Bogdanp | 1 comments | | HN request time: 0.218s | source
Show context
platelminto ◴[] No.45100959[source]
I was about to start a new project with Next.js... is anyone willing to give me some advice?

I'm about to start building an e-commerce site (30-50k poster print designs, i.e. no inventory), and was leaning towards a Django backend (because I know it) and... some sort of SSR frontend. I'm not really a frontend guy, but taking this as an opportunity to learn it. This article obviously does not inspire confidence in me choosing Next.js - would someone have any suggestions/pros and cons of what to use?

I currently see the options for doing SSR as:

- Next.js: well-represented in AI training data (though recent versions had breaking changes? I'm not sure), but annoying to actually use (according to this article/general sentiment I've found online), and pushes you into Vercel? (I barely know what that means)

- SvelteKit: best DX and nice to use, but might be less present in AI training data?

- Django templates + HTMX: possibly limiting? Less maintainable once you get to a certain size? I'm not sure.

- Other options?

replies(12): >>45101031 #>>45101036 #>>45101091 #>>45101126 #>>45101160 #>>45101550 #>>45101551 #>>45102120 #>>45103502 #>>45107587 #>>45108442 #>>45109794 #
komali2 ◴[] No.45101036[source]
In my opinion (9 years FE exp) you should build your ecommerce site in shopify or wordpress + woocommerce or some other off the shelf tool. It will be up before the evening's out and you won't be spending that much extra than you would have anyway, and everything will Just Work (tm) and look pretty good (chuck out 50$ for a nice wordpress theme and you're golden).

If you insist on rolling your own, Django + templates should be plenty. Lots of existing code for integrating Stripe or whatever. AI will be fine at it. You could potentially investigate medusajs or prestashop. Here's a list that could be fun to investigate: https://github.com/awesome-selfhosted/awesome-selfhosted?tab... but keyword is fun. You should build it in wordpress because that is a bombproof solution running like half the internet and will save you endless amount of time.

If you're doing this as an exercise to learn a new tool, leave the AI to the side as you're robbing yourself an opportunity to delve into docs and gain more domain knowledge. And absolutely do not touch nextjs with a 10 foot pole, it's an absurdly overwrought tool. The only people that should learn nextjs are people working at dev houses that churn out a shitload of full stack apps for clients that have the budget to shell out for vercel's hosting costs. And even then imo they should just be using django + react + vite + tanstack MAYBE.

HTMX is cool but I'm not sure the point, again if for fun why not, but I would ask yourself: you get your site up and running and you spend the next year scrambling around putting things in boxes and printing shipping labels, and then in 2026 Thanksgiving right before the holiday rush something breaks in your app and you want to fix it but HTMX/nextjs/whatever have gone through 2 breaking change upgrades and so have 4 different libraries they rely on and actually the most up to date version of two libraries you rely on are not interoperable right now because they depend on different node versions or some other bullshit, and now what do you do?

Just use wordpress.

replies(5): >>45101237 #>>45101238 #>>45102147 #>>45102889 #>>45103281 #
recursivedoubts ◴[] No.45102889[source]
htmx will not have gone through 2 breaking change upgrades

https://htmx.org/essays/future/

replies(1): >>45104201 #
1. wmanley ◴[] No.45104201[source]
And also:

> and so have 4 different libraries they rely on

HTMX has no dependencies. https://htmx.org/essays/vendoring/

> and actually the most up to date version of two libraries you rely on are not interoperable right now because they depend on different node versions

HTMX has no build step. https://htmx.org/essays/no-build-step/