Live data from Hacker News

Svelte 5 Released

npmjs.com

161–170 of 254 posts

Re: Svelte 5 Released

#161

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

> vanilla HTML/CSS/JS

...but that's what Svelte is not. The techniques you adopt won't transfer over to vanilla HTML/CSS/JS without the magic Svelte compiler. These habits will become crutch when Svelte inevitably goes the way of every Javascript frontend framework.

> something complex like React

React is not that complex, certainly not more so than Svelte. It's hard to wrap your head around some behaviors, but at the end of the day, it is really just Javascript/Typescript. It is programming. As a programmer, I want to spend most of my time programming in a programming language, not so much of it configuring the Rube-Goldberg machine that is HTML/CSS. Your mileage may vary, of course.

> this silly side project made in Svelte over a weekend

I will admit, that's what Svelte excels at.

Re: Svelte 5 Released

#162

Svelte 5 has been very nice to work with over the past few months. Yes, runes require you to think more carefully about lifecycles and updates. And you may end up writing a little more code initially than with svelte 4. But it serves you better in the long run with complex apps. I found a process for gradually turning a simple app into a more complex one that works for me. I iteratively move $state() runes out of .sv…

> I iteratively move $state() runes out of .svelte files and into .svelte.ts files where I build a more abstract data-oriented structure for my app from a series of mutually linked classes. Then those runes can be re-imported into the .svelte files, or used and updated wherever you need.

I don’t know exactly how you do this, but it sounds like you are dangling on the global state of the runes. This is DANGEROUS in Svelte and can definitely ruin your day.

Re: Svelte 5 Released

#163
post #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.

React is cargo cult at the moment and has been for years already. People will just use react because everybody is using react, no matter if it makes sense or not.

Re: Svelte 5 Released

#164

When I recently looked at SvelteKit, what confused me the most was the universal load function. If you use "if !browser" with sveltes browser object, the things inside that branch will only run on the server. But because svelte is compiled, these functions get compiled to two different versions, one for the server and one for the client, in which that if statement has been completely compiled out. That in itself isn'…

> but it's weird that normal code and control flow influences compilation. In other languages this would be a macro or something that clearly expresses that it's metaprogramming.

Similar kind of thing happens in zig during comptime execution.

Re: Svelte 5 Released

#165

Earlier quoted context omitted.

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!

The old syntax is considered legacy and it is recommended to upgrade. There is a migration tool to do most of it automatically for you.

Is there a timeline for the deprecation already? Can I still enjoy it for just a bit longer? ;-;

Re: Svelte 5 Released

#166
post #108

Earlier quoted context omitted.

Here’s the release on GitHub: https://github.com/sveltejs/svelte/releases/tag/svelte%405.0... Probably a better link for this post?

Or even https://svelte-omnisite.vercel.app/ which is linked from there. It is the v5 Svelte homepage, currently svelte.dev is v4 Edit: I'm not so sure that's up to date actually. Lots of "Coming soon" sections

Yeah, looks like work in progress (and when it's ready I think it will be on svelte.dev)

Re: Svelte 5 Released

#167
post #153
post #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.

If Vue hasn't made a dent, I don't ever expect Svelte to. Angular was the only high-level competitor and I haven't heard that one in a long time already. For a framework to eat into React's usage, it needs a strong evangelist (like Facebook has been for React)

But didn’t Vue come before React? And it’s mostly the same from what I understand, it’s not totally different like Svelte. I think it can change, if more people put it on their resumes and LinkedIn and if those that know React say can do things in 1/3 the time with Svelte and mention that in interviews as well. That is a slow way of evangelism for Svelte that can spread.

Re: Svelte 5 Released

#168
post #153
post #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.

If Vue hasn't made a dent, I don't ever expect Svelte to. Angular was the only high-level competitor and I haven't heard that one in a long time already. For a framework to eat into React's usage, it needs a strong evangelist (like Facebook has been for React)

I was very amused this summer, hearing a company that I had worked at six years ago is switching from React to Angular. I had thought angular was dead.

Re: Svelte 5 Released

#169
post #116

Earlier quoted context omitted.

Apple Music isn't OSS, but it's quite a large Svelte app: https://music.apple.com

more notable companies using svelte because this always comes up https://x.com/SvelteSociety/status/1260209026563858432

https://xcancel.com/SvelteSociety/status/1260209026563858432

Re: Svelte 5 Released

#170
post #153

Earlier quoted context omitted.

If Vue hasn't made a dent, I don't ever expect Svelte to. Angular was the only high-level competitor and I haven't heard that one in a long time already. For a framework to eat into React's usage, it needs a strong evangelist (like Facebook has been for React)

I was very amused this summer, hearing a company that I had worked at six years ago is switching from React to Angular. I had thought angular was dead.

Angular is really popular for corporate apps, in companies who use .NET. Possibly because Angular has batteries included.
Post reply on HN