Hacker News new | ask | show | jobs
by darajava 374 days ago
Can you suggest alternatives? I've used Next and Svelte[kit] in prod and have been very unhappy with both.
3 comments

No framework, create a SPA using vite
Might not hurt to look into React Router 7 Framework mode. I've started using it in one of my side projects and loving it so far.
Can you name/explain your problems with them? What was the intended use case and goals, what did you like about them, and what you didn't, and what was something that was definitely missing for you?
Svelte is very immature in terms of tooling and IDE support and that hasn't seemed to improve in the last 7 years of using it. Libraries are sub-par vs React and the design of the language does not favor making things explicit. $:{} for example is not explicit, I'd much rather use a slightly longer token (like useEffect) to help document what's going on. That's just one example, it's riddled with things like that (e.g keyed foreach, store $ syntax). Also calling all files +page.svelte leads to such a messy experience in the IDE. There are other problems too I'm not thinking of. I think a lot of the draw of Svelte comes from it "feeling" very fast (both to build and to iterate on) when you first start using it, but imo using it for anything non-trivial is a nightmare.

Built in scoped CSS is a great idea and compiled bundle is nice. I used it for multiple projects (order system, admin panels, etc) and it always feels that little bit more brittle when I use Svelte vs something more mature. I won't use it again for any project.

I have less experience with Next and it was longer ago but iirc I found it needlessly hard to use and deploy as well as some problems with Image tags (you need the exact size of the images?). I also found their gamified tutorial really off-putting and indicative of corporate bloat which I guess makes sense now that they're locking users in. The reason I used it was for page loading speed optimization (SSR) and didn't find any better alternatives that use React at the time. I use Next for my landing page https://audiodiary.ai and for its admin panel.

> $:{} for example is not explicit, I'd much rather use a slightly longer token (like useEffect) to help document what's going on

FWIW you're describing a legacy syntax — modern Svelte has explicit effects, and addresses your other concerns. I think you'll find it's much more to your liking https://svelte.dev/docs/svelte/$effect