Live data from Hacker News

Svelte 5 Released

npmjs.com

41–50 of 254 posts

Re: Svelte 5 Released

#41

Good work! I’m not really sold on the runes stuff though (tldr: https://svelte.dev/blog/runes ) The old way is a bit “magical” in a sense that it does some stuff under the hood to implement the intention behind your code, but it reads really straightforward: let counter = 0; // ... {counter} `let` in a .svelte compoment makes a variable reactive. If your state is outside a component, you use stores. With the `$store`…

My only problem with this is because now is more verbose, why I should use Svelte over Vue? Arguably a more stablish framework.

No shadow dom and a better template directives? Maybe, not sure.

Re: Svelte 5 Released

#42

I love Svelte and use it for all my personal projects and all company projects (except strictly static sites are still built with just 11ty but I hate it and want to move off it). But I'm going to wait a bit on v5 for the company, scanning all the issue headlines, it looks like there are a still a lot of unresolved edge cases: https://github.com/sveltejs/svelte/issues As for my latest personal project, upgrading righ…

Definitely try Astro for static sites, I'm loving it!

I've started using Astro for static sites, but also as a lightweight Sveltekit replacement.

I saw they have Svelte 5 support, and maybe this would make runes a killer app if we can inject the runes into Astro, (or even React) components?!

Re: Svelte 5 Released

#44
post #29
post #23

What's the preffered way to make simple SPAs using Svelte now? I'm using this +layout.ts with sveltekit: > export const ssr = false; export const prerender = false; But it feels awkward for real SPAs - internal applications that have no need for server side rendering.

I do have to ask - why don't you want to use SSR just because it's an internal application? For the new Svelte Society website we're SSR:ing everything (even the Admin dashboard). Being able to use form actions is a god send. With that said, unfortunately when using Kit in "SPA mode" you're not getting the full experience, but it's still the best thing out there. You could try Routify as well. There's a great talk fr…

SvelteKit is great in SPA mode as well. Other reason would be for example embedding it under wails/tauri with no backend required.

Re: Svelte 5 Released

#45
post #27
post #23

What's the preffered way to make simple SPAs using Svelte now? I'm using this +layout.ts with sveltekit: > export const ssr = false; export const prerender = false; But it feels awkward for real SPAs - internal applications that have no need for server side rendering.

What's the goal of disabling SSR though? I get that hydrations value is mainly in SEO and a tiny improvement in initial draw speed, but why would you want it disabled, specifically? It's pretty much what you already wrote though. https://kit.svelte.dev/docs/single-page-apps

SSR always yields surprises! If you don't _need_ it, don't enable it; everything is simpler.

Re: Svelte 5 Released

#46

I can wholeheartedly recommend Svelte. As someone who can only do vanilla HTML/CSS/JS, it lets me build projects quickly and efficiently without having to learn something complex like React. Case in point this silly side project made in Svelte over a weekend: https://meoweler.com

That website is actually a great way to compare options, thanks for sharing! I did find that it gives a 500 error for Birmingham, AL specifically, if you’re still working on it.

Re: Svelte 5 Released

#47

Good work! I’m not really sold on the runes stuff though (tldr: https://svelte.dev/blog/runes ) The old way is a bit “magical” in a sense that it does some stuff under the hood to implement the intention behind your code, but it reads really straightforward: let counter = 0; // ... {counter} `let` in a .svelte compoment makes a variable reactive. If your state is outside a component, you use stores. With the `$store`…

My only problem with this is because now is more verbose, why I should use Svelte over Vue? Arguably a more stablish framework. No shadow dom and a better template directives? Maybe, not sure.

I don’t have a definite answer as I haven’t worked with Vue that much. Still, I like Svelte syntax a bit better (e.g. {#each x in xs} vs. v-for), and yeah, all the compile time reactivity stuff works out pretty well in terms of performance.

The runes are still optional, I think, and you can still use the old syntax. Not sure if that will be true in Svelte 6 though!

Re: Svelte 5 Released

#48
Hope it starts to chip into React’s usershare and more companies adopt it, but I know that’s a slow process especially for the big companies.

I got out of front end development for most of the years Angular and React have dominated and it looked like a mess, but Svelte and even Astro make sense, maybe I’m just old school. I would totally go back to the frontend with these new frameworks.

Re: Svelte 5 Released

#49
post #7

We use Svelte 4.0 in production and it performs beautifully; it rarely is the cause of our frustrations. Excited to try the new version. Lately I’ve also been wondering about the relationship and correlation between software writing skills and writing skills.

Besides a mathematical inclination, an exceptionally good mastery of one's native tongue is the most vital asset of a competent programmer.

-- Edsger W.Dijkstra https://www.cs.utexas.edu/~EWD/transcriptions/EWD04xx/EWD498...

Re: Svelte 5 Released

#50

I can wholeheartedly recommend Svelte. As someone who can only do vanilla HTML/CSS/JS, it lets me build projects quickly and efficiently without having to learn something complex like React. Case in point this silly side project made in Svelte over a weekend: https://meoweler.com

[dead]
Post reply on HN