SvelteKit 3
Thread
Loading the complete thread in the background. This saved snapshot is available now. Refresh
Unofficial Hacker News client; not affiliated with Y Combinator.
SvelteKit 3
Loading the complete thread in the background. This saved snapshot is available now. Refresh
Unofficial Hacker News client; not affiliated with Y Combinator.
sharktheone · · focus · HN ↗
pampas · · focus · HN ↗
cassepipe · · focus · HN ↗
chrysoprace · · focus · HN ↗
They still do a good job and allow you to cache the results and invalidate that cache, but they are at a route/layout level rather than at a component level, which is what remote functions solve.
[0] <a href="https://svelte.dev/docs/kit/load" rel="nofollow">https://svelte.dev/docs/kit/load
chrysoprace · · focus · HN ↗
nlh · · focus · HN ↗
blakeashleyjr · · focus · HN ↗
I've had to work on a Next.js for work and much prefer Sveltekit. Excited to try this release!
383toast · · focus · HN ↗
sampsn · · focus · HN ↗
jitl · · focus · HN ↗
casper14 · · focus · HN ↗
ceejayoz · · focus · HN ↗
jack_pp · · focus · HN ↗
ceejayoz · · focus · HN ↗
DonHopkins · · focus · HN ↗
Then React turned that confidently idiotic folklore into an ecosystem: every confident answer depends on which year it was posted, which version it assumes, and which of six abandoned libraries it recommends. The LLM blends them into a seventh approach that never existed.
For now, I suspect Svelte's shorter cleaner history with fewer wrong paths taken and retreated from will mean there are fewer incoherent competing approaches for LLMs to blend together into hallucinations.
Perhaps less contradictory training data is better than more incoherent training data.
dale-cooper · · focus · HN ↗
bigstrat2003 · · focus · HN ↗
zuhsetaqi · · focus · HN ↗
nozzlegear · · focus · HN ↗
transdev12 · · focus · HN ↗
[dead]
esafak · · focus · HN ↗
Recursing · · focus · HN ↗
smt88 · · focus · HN ↗
DonHopkins · · focus · HN ↗
In the "Unix Haters Handbook", "X-Windows Disaster" chapter, "Ice Cube: The Lethal Weapon" section, I quoted Jamie Zawinski, whose timeless and tactile observation also applies to React:
> Using these toolkits is like trying to make a bookshelf out of mashed potatoes.
<a href="https://news.ycombinator.com/item?id=35631889">https://news.ycombinator.com/item?id=35631889
<a href="https://donhopkins.medium.com/the-x-windows-disaster-128d398ebd47#3f73" rel="nofollow">https://donhopkins.medium.com/the-x-windows-disaster-128d398...
justin66 · · focus · HN ↗
pampas · · focus · HN ↗
zem · · focus · HN ↗
winfredJa · · focus · HN ↗
alpha_squared · · focus · HN ↗
theflyinghorse · · focus · HN ↗
afavour · · focus · HN ↗
stevenhubertron · · focus · HN ↗
digitaltrees · · focus · HN ↗
onemoresoop · · focus · HN ↗
meowface · · focus · HN ↗
aoeusnth1 · · focus · HN ↗
DonHopkins · · focus · HN ↗
[dead]
byzantinegene · · focus · HN ↗
DonHopkins · · focus · HN ↗
jamies · · focus · HN ↗
We use Svelte extensively at Orb.net for our website (duh), but also as a framework for our desktop and mobile apps. Wails serves our golang and SvelteKit/Svelte provide the UX. It's been tremendous for multiplatform productivity, and binaries are less than 20mb! Nothing like Electron!
OzzyB · · focus · HN ↗
zuhsetaqi · · focus · HN ↗
OzzyB · · focus · HN ↗
We do a lot of data/quant analysis w/ Go which is great for that; then having the opportunity to slap on a lightweight GUI allow us to make some great internal tools etc.
smallmancontrov · · focus · HN ↗
spieke · · focus · HN ↗
ForHackernews · · focus · HN ↗
jamies · · focus · HN ↗
thomaslord · · focus · HN ↗
Tauri has been trying to dig itself out of that hole for a while by adding CEF support. It looks like they've got that running in the Tauri 3.0 alpha, but I think they may still have some issues with Wayland.
killingtime74 · · focus · HN ↗
escapecharacter · · focus · HN ↗
kthartic · · focus · HN ↗
afavour · · focus · HN ↗
weitendorf · · focus · HN ↗
nozzlegear · · focus · HN ↗
chrysoprace · · focus · HN ↗
argentinian · · focus · HN ↗
brachkow · · focus · HN ↗
In short:
1. Svelte is a good framework, but most of the DX praise comes from React folk. In my experience, Svelte is less polished and less comfortable to work with than Vue.
2. The biggest problem with Vue is that your choice of SSR frameworks is limited to Nuxt, and Nuxt is, to put it mildly... not a good framework. It is full of reinventing the wheel, ambiguity, and foot guns. In my experience, I regretted every project I used Nuxt for.
As I needed good SSR, SvelteKit was a breeze: everything just renders on the server when I want it to, proper client/server separation, MVC-looking code.
3. Svelte has way lower adoption than Vue, not to mention React. So there are not many 3rd party libraries, and even important tools like Storybook or ESLint struggle with it.
It also tends to switch syntaxes a lot. Even this announcement contains a mention of switching from +page files to queries. This hurts AI usage a lot.
As a conclusion: A year ago, I would say that you should pick Svelte where SSR is critical, and stay on Vue for the rest. But as we have <a href="https://inertiajs.com/" rel="nofollow">https://inertiajs.com/ right now, you can do SSR of any complexity in Vue + any backend you have.
phoghed · · focus · HN ↗
I tried Svelte a couple times over the years, never really clicked for me though.
norman784 · · focus · HN ↗
phoghed · · focus · HN ↗
brachkow · · focus · HN ↗
React, as the most bare-bones framework, might be simplest to integrate, and you can see that by the enormous size of its ecosystem.
Vue and Svelte will have problems with integrating various devtools, due to the fact they use custom syntax to mimic native web tech. In Vue, this problem is solved by framework popularity and the fact that the Vue team produced most of the key devtools, so Vue is, of course, supported.
Svelte, on the other hand, still works badly with Storybook and linters.
A good counterexample to your take will be that I was unable to use the JS version of Framer Motion with Svelte without huge caveats that made making any complex animation impossible. I wasn't able to do so with Vue, for roughly the same reasons, but Vue, as a big framework, got 1st party support.
dminik · · focus · HN ↗
The re-render model just doesn't quite fit with the way most JS libraries work. They hand you a class that you have to keep around. This can be solved with useState, but you have to use this weird construction `const [instance] = useState(() => new Whatever())`. Or even worse if the library needs an element to instantiate.
Then, you likely need some event listeners. They ended up not implementing useEvent, so this has to happen in useEffect. God forbid if you need to rebind the listener because a prop changes (possibly every rerender) or the library does something heavy on adding them.
Then, if a prop changes and you need to do something (like recenter a map), useEffect.
Occasionally you might want to reach for useSyncExternalStore but then get hit by the identity issue. The return value must be the same between renders or you end up with infinite rerenders. Many libraries just do `return { foo, bar}`. Not good enough for react.
Basically every JS library integration ends up with a thousand use effects, various useMemos (and useCallbacks) and I've never got (or seen) a satisfying result. There's always sync issues or too many rerenders or...
tamimio · · focus · HN ↗
ramijames · · focus · HN ↗
CharlesW · · focus · HN ↗
norman784 · · focus · HN ↗
ramijames · · focus · HN ↗
slopinthebag · · focus · HN ↗
teg4n_ · · focus · HN ↗
slopinthebag · · focus · HN ↗
i do think react (without a framework) is the beat option though.
DimmieMan · · focus · HN ↗
You can fire up a solid project and get close to react's speed and quality even with earlier preview versions. Comparison aside, the reliability and speed of svelte tooling has felt extremely lacking on larger projects to the point i resent working on my 3 year old sveltekit codebase.
mexicocitinluez · · focus · HN ↗
jesse_dot_id · · focus · HN ↗
stillatit · · focus · HN ↗
brachkow · · focus · HN ↗
avarun · · focus · HN ↗
zuhsetaqi · · focus · HN ↗
weitendorf · · focus · HN ↗
For most of 2024-2025 frontier models really struggled with Svelte 4 vs 5 compatibility issues. Some of the main contributors, to their credit, really put in a lot of work to create benchmarks/MCP/other tools to make AI better at using Svelte. Personally I am just not a fan of MCP and other tools like that at all, and decided I'd rather just use vanilla css/js for new projects.
Look at this; it's literally multiple times more expensive to have a model sifting through all this stuff in every context use them with a tool: <a href="https://svelte.dev/docs/ai/prompts/llms.txt" rel="nofollow">https://svelte.dev/docs/ai/prompts/llms.txt All of these are input tokens and turns to gather context.
The "too niche to be a major training priority" dilemma is actually a really big problem that almost all new or emerging dev tools have now. Incumbents and category leaders are priorities and show up in major benchmarks, so models develop excellent tacit knowledge and capabilities with them and expose it everywhere all the time for "free" in their weights. Everything else is at a major disadvantage because models don't know about them, how to use them, how they work, what they're for/why, and every time you use them you pay a big capability and token hit because models only learn about them in-context.
I don't blame the Svelte team for this at all. There should be a better way for devtool projects to contribute to frontier labs training pipelines or properly posttrain their own agent coding models.
tonyoconnell · · focus · HN ↗
sureglymop · · focus · HN ↗
weitendorf · · focus · HN ↗
All those tools and packages are constantly making breaking changes or introducing incompatibility issues or becoming obsolete, and there is so much maintenance. I went pretty deep on CSR/SSG/browser automation over the past two years and realized that everything you get out of these tools is probably 20-400 lines of javascript you could just ask an LLM to implement when you need it. I’ve seen people waste so many hours, days, and weeks on tailwind ui crap (solvable in minutes with css), vitest and object lifecycle crap (use the browser debugger, do e2e tests) and major version upgrades (there’s about 95% less of this in the browser and >99% less outside experimental APIs).
I think for Facebook/Github sized web applications, with really big teams and lots of custom tooling (eg React) these frameworks make sense. Most websites just need basic file serving/rendering, to send and respond to http requests, and some javascript to run on the client (but html and css can actually handle many core UI patterns). I’ve been much happier not using frameworks because my projects just work and the knowledge I build doesn’t constantly churn.
pelagicAustral · · focus · HN ↗
[???] Why the hell would I use SvelteKit for a static site?
weitendorf · · focus · HN ↗
Since our application sat behind a proxy that requires auth, and we could host our SSG on Cloudflare pages, we didn’t have to expose any server/compute to the public Internet, and could be pretty carefree with how we developed the main site.
DrScientist · · focus · HN ↗
So is the rise of AI coding, the end of frameworks?
Frameworks were created to reduce boiler plate ( at the expense of new abstractions which occasionally leak ) - boiler generation is less of an issue for AI, and the underlying platform is very well specified?
I guess the only problem with vanilla is if the sheer volume of text overwhelms the context?
SoftTalker · · focus · HN ↗
Even more fundamentally, frameworks were created to reduce the developer skill required to build applications. This has been a pipe dream many have chased since COBOL replaced assembly language.
LLMs are probably the first technology that actually approaches doing that. And yes, they don't need frameworks, they're indifferent to the amount of code and will write JS and HTML just as well as anything else you ask them to do, maybe better.
weitendorf · · focus · HN ↗
I’m not really sure that most web frameworks reduce boilerplate. There is a lot of boilerplate involved in setting up routes, and builds, and so on. As far as I can tell they only really make sense for very large teams (who need a uniform shared data model, design language, processes, etc.) and people who really want to run server side js/do a lot of SSR.
The thing about web “frameworks” is that they’re not that different in structure from what you’d build to do SSR and a repeatable way to add pages/dirs and shared assets, in any language. You can build a minimal version of something that does that in less than an hour, at least in Go. go:embed and a factory method for handlers :)
I think we’ll all end up with more bespoke “frameworks” (specialized web servers) with less gravitational pull towards dysfunctional (IMO, the node ecosystem) tooling, and still have many people using the best major frameworks. Truly large projects will still need to use react and svelte and co unless they can train a model on their own framework. But that’s really hard
DrScientist · · focus · HN ↗
And if you are looking at it - do you insist on certain patterns or structure to allow yourself to more easily navigate it?
weaksauce · · focus · HN ↗
smt88 · · focus · HN ↗
scosman · · focus · HN ↗
Then I got a model to one-shot a React+Shadcn project. It just knew what to do. Every detail was perfect. I couldn't find a single thing to complain about, I didn't chase any bugs.
I still think svelte is the better technology and developer experience (if you're coding by hand). But the React experience was amazing. Hoping models close the gap fully so I can stay w Svelte -- I do still like reading and tweaking the code.
sometimez · · focus · HN ↗
jolaflow · · focus · HN ↗
sghiassy · · focus · HN ↗
Honest question? Whatever the agent is best at programming out to achieve a high quality outcome works for me. Just write the acceptance tests and be done with it
goolz · · focus · HN ↗
drewbitt · · focus · HN ↗
password54321 · · focus · HN ↗
It is probably LLMs all the way down.
etatester · · focus · HN ↗
sghiassy · · focus · HN ↗
afavour · · focus · HN ↗
rbits · · focus · HN ↗
eknkc · · focus · HN ↗
I used to keep an eye on the web frameworks. Tried Solid JS, Vue, Svelte etc regularly to see what's going on. But at this point, if I'm not gonna enjoy the ergonomics or suffer from issues of the platform then it might as well be jquery + imperative code.
Also, web frameworks are not really about coding anyway. These are HTML generators. They were about developer ergonomics beyond anything and were important when it was about developers.
bottlepalm · · focus · HN ↗
kursus · · focus · HN ↗
x-complexity · · focus · HN ↗
Even under your premise, the framework that helps agents get there faster is the better framework, programming capabilities notwithstanding.
password54321 · · focus · HN ↗
kursus · · focus · HN ↗
jamesnorden · · focus · HN ↗
favori995749721 · · focus · HN ↗
[dead]
poetril · · focus · HN ↗
But having used it A LOT this year for personal projects, large work initiatives, and one-off web tools. I’m happy to say all the modern llms seem to do just fine with it. They even handle the experimental features, like remote functions, very well. It’s mostly preference but I find reading Svelte code much more pleasant than React/Vue.
etatester · · focus · HN ↗
kevinak · · focus · HN ↗
askjdfksdbfhk · · focus · HN ↗
etatester · · focus · HN ↗
1-2 basically a different templating language
2-3 basically a different templating language
4-5 compatible but changed again
prophesi · · focus · HN ↗
Sammi · · focus · HN ↗
pier25 · · focus · HN ↗
runtime_terror · · focus · HN ↗
runtime_terror · · focus · HN ↗
OtomotO · · focus · HN ↗
Unless I am paid to do it.
EGreg · · focus · HN ↗
sometimez · · focus · HN ↗
nayaravis · · focus · HN ↗
[dead]
thevivekshukla · · focus · HN ↗
chabska · · focus · HN ↗
mexicocitinluez · · focus · HN ↗
"Hey team, some guy on HN said we should use Svelte because it has a good "aura". Has that been factored into our CBA?"
shimman · · focus · HN ↗
mexicocitinluez · · focus · HN ↗
shimman · · focus · HN ↗
mexicocitinluez · · focus · HN ↗
nathias · · focus · HN ↗
JodieBenitez · · focus · HN ↗
mexicocitinluez · · focus · HN ↗
marmarama · · focus · HN ↗
A (good) framework abstracts away the complexity so you hit that tipping point much later in terms of codebase size, and reduces your token spend to boot.
JodieBenitez · · focus · HN ↗
twsted · · focus · HN ↗
cpt100 · · focus · HN ↗
bigstrat2003 · · focus · HN ↗
cpt100 · · focus · HN ↗
jamesnorden · · focus · HN ↗
wg0 · · focus · HN ↗
Svelte had one edge - compiled code making surgical DOM updates. React has a compiler too and if you ever have opened Facebook or Instrgram, all that UI is compiled by a React compiler already.[0]
[0]. <a href="https://react.dev/learn/react-compiler" rel="nofollow">https://react.dev/learn/react-compiler
spider-mario · · focus · HN ↗
Is that supposed to be a selling point?
herrherrmann · · focus · HN ↗
wg0 · · focus · HN ↗
spider-mario · · focus · HN ↗
stephaner · · focus · HN ↗
efilife · · focus · HN ↗
tnkuehne · · focus · HN ↗
sensanaty · · focus · HN ↗
shreedx · · focus · HN ↗
I did a grave mistake using Next.js for one project not too long ago, thinking LLMs know it better and it will be a smooth sailing. It wasn't :D Never touching that thing again, it just doesn't click for me.
huflungdung · · focus · HN ↗
[dead]
pelagicAustral · · focus · HN ↗
cristaloleg · · focus · HN ↗
pelagicAustral · · focus · HN ↗
written-beyond · · focus · HN ↗
krehwell · · focus · HN ↗
[deleted] · · focus · HN ↗
[deleted]
gozzoo · · focus · HN ↗
What about using React/Svelte for the frontend and a separate backend in Node.js or another stack? Is there any real advantage to having a single monolithic codebase for everything?
mindwok · · focus · HN ↗
lelandfe · · focus · HN ↗
You can enforce keeping them in sync at CI time. This is more effective in a monorepo.
mindwok · · focus · HN ↗
lelandfe · · focus · HN ↗
But fair point on the complex types.
dankobgd · · focus · HN ↗
rukshn · · focus · HN ↗
But for my latest project I started using Svelte and I love it.
<a href="https://github.com/entangle-cloud/wave" rel="nofollow">https://github.com/entangle-cloud/wave
I love that stores comes out of the box and works well. No more callbacks for two way binding and Vue $emit hacks.
machiaweliczny · · focus · HN ↗
1) The getter trap - if you forget to export hooks via getters you don't get reactivity and it's not easy to figure out
2) The async data fetching - for example fetching data async is currently coupled to views which it shouldn't be - was frustrating a lot
3) That reactivity system is not runtime only
4) I am not a fan of adding these new things like remote functions - most of apps need multiple frontends and this coupling isn't needed. This will be fad same as GraphQL
EricFrost · · focus · HN ↗
<a href="https://eric-frost.github.io/solarite/" rel="nofollow">https://eric-frost.github.io/solarite/
There are no signals, proxies, or decorators, or any compilation. You just use plain data. Though the trade-off is that you have to call render() yourself. I prefer it that way though.
HugoDz · · focus · HN ↗
pier25 · · focus · HN ↗
Ultimately I ended up moving away to Solid primarily because I can write vanilla TS/TSX. Like it or not, TS/TSX is a standard these days and most editors or IDEs support it out of the box.
[1] <a href="https://plugins.jetbrains.com/plugin/12375-svelte" rel="nofollow">https://plugins.jetbrains.com/plugin/12375-svelte
philipthetenth · · focus · HN ↗
pier25 · · focus · HN ↗
philipthetenth · · focus · HN ↗
afavour · · focus · HN ↗
pier25 · · focus · HN ↗
afavour · · focus · HN ↗
rich_harris · · focus · HN ↗
Honestly, I didn't expect the release to generate much conversation at all. There's a lot less focus/interest in front-end frameworks generally these days, for obvious reasons, so I figured the median reaction would be 'oh, the Svelte team are still shipping? good for them' and not much more. It's a joy to see the conversation here whether it's from happy users, or people who prefer different things, or people who have fully outsourced the writing-the-code bit to LLMs and straight up don't care about the underlying tools any more.
Which I totally understand! As framework authors we're very persnickety about the details of the code, so we've been on the slower end of the LLM adoption curve, but even we're starting to delegate more of the work to agents. If you're prompting an app into existence it's natural not to care that much about the particulars. But a question I've seen several times here, and in the zeitgeist more generally — 'in a world of agents why should I care about Svelte vs React vs whatever?' — deserves an answer.
And it's this: your app will be _better_ if you use Svelte. Your JavaScript bundle will use fewer bytes, your server-side rendering will take fewer milliseconds, and your users will reap the benefits: faster, more efficient apps. For all that the agentic revolution has created a huge _quantity_ of software, the _quality_ of the average app stubbornly refuses to budge. If anything, software is becoming less reliable. I think we've all felt that. Using a framework that treats things like accessibility and progressive enhancement as core concerns will help you steer towards better outcomes. (Your agent will use fewer tokens as well.)
Of course, this was always the pitch! Agents don't change that. And that's why we're still shipping and still sweating the details. We have some stuff coming up that we're unreasonably excited about — we really care about this stuff, and we're very grateful to be part of a community who shares that passion. Thank you for the support, it means the world to us.
templar_snow · · focus · HN ↗
Fergusonb · · focus · HN ↗
Svelte / Sveltekit helped programming "click" for me , and years later I'm doing work I love for people who appreciate it.
They're my favorite starting point for almost everything I build.
skeletal88 · · focus · HN ↗
0xblinq · · focus · HN ↗
cfowles · · focus · HN ↗
Huppie · · focus · HN ↗
Even though I delegate more and more to coding agents I've stayed with Svelte(kit) for any project where I can choose. It's always been a breeze to work with coming from an Angular background and (imho) the average quality of the resulting code (quality of training samples I guess) is just better than with most other frameworks I've seen.
I totally agree with you bundle size and performance matter and I look forward to working with remote functions.
All this to say: Congrats on the release!
nolanl · · focus · HN ↗
cicko · · focus · HN ↗
zyf · · focus · HN ↗
Can't wait for the next release
twoquestions · · focus · HN ↗
If y'all are worried about AI not doing Svelte well, I'm willing to vouch for at least Opus using it well, and there's svelte-check and friends to make sure you're not doing anything dumb on accident.
integrallis · · focus · HN ↗
yencabulator · · focus · HN ↗