Most active commenters
  • cageface(3)

←back to thread

Svelte 5 Released

(www.npmjs.com)
415 points begoon | 28 comments | | HN request time: 1.848s | source | bottom
1. sansseriff ◴[] No.41890232[source]
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 .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. If you plan it right, I think it avoids the need for heavy redux-like state management. (at least I think so. I haven't worked with redux much myself)
replies(4): >>41890939 #>>41891144 #>>41891258 #>>41893765 #
2. mhitza ◴[] No.41890939[source]
Do you know of any large OSS software built with Svelte? I'd like to see how it turns out in the long run, because I'm reticent of all frontend frameworks nowadays through what I perceive as gateways to uncontrollable accidental complexity and abstractions.
replies(9): >>41891082 #>>41891269 #>>41891381 #>>41891428 #>>41891502 #>>41891606 #>>41891748 #>>41891802 #>>41943955 #
3. v3ss0n ◴[] No.41891082[source]
Ofcoz hypest and ml opensource software frontend are build with svelte and they're very successful

huggingface https://huggingface.co/pydio https://huggingface.co/docs/chat-ui Ollma webui https://github.com/open-webui

These are just a few of them that I quickly search and look at their popularity .

4. kosmozaut ◴[] No.41891144[source]
MVC is all the rage these days
5. jwilber ◴[] No.41891258[source]
Just my personal opinion: I love svelte for small projects but the whole runes rewrite just feels so much less ergonomic. A step in the direction away from the simplicity that drew me to svelte in the first place.

That said, there is backwards compatibility with the older syntax, so this isn’t a dealbreaker, and the team does a good job of explaining the reasons behind their selected design patterns.

(Interestingly, I’ve felt the opposite with react lately - they’ve been making the dx simpler).

replies(1): >>41892076 #
6. bbkane ◴[] No.41891269[source]
Does https://github.com/dbgate/dbgate count?
7. tjhorner ◴[] No.41891381[source]
Immich uses SvelteKit for its frontend: https://github.com/immich-app/immich

I’ve used it as a reference for a NestJS+SvelteKit app in the past, they did a pretty good job.

8. djhn ◴[] No.41891428[source]
Huly was just recently on the HN frontpage: https://github.com/hcengineering/platform

Gradio: https://github.com/gradio-app/gradio

9. slig ◴[] No.41891502[source]
Windmill - https://github.com/windmill-labs/windmill
10. keb_ ◴[] No.41891606[source]
PocketBase's UI is built with Svelte: https://github.com/pocketbase/pocketbase/tree/master/ui

EDIT: Also, not OSS, but https://search.brave.com seems to be built with Svelte

11. Aliabid94 ◴[] No.41891748[source]
Gradio is built with svelte https://github.com/gradio-app/gradio
12. FractalHQ ◴[] No.41891802[source]
Apple Music isn't OSS, but it's quite a large Svelte app: https://music.apple.com
replies(2): >>41891909 #>>41895080 #
13. swyx ◴[] No.41891909{3}[source]
more notable companies using svelte because this always comes up https://x.com/SvelteSociety/status/1260209026563858432
replies(2): >>41892041 #>>41893952 #
14. esperent ◴[] No.41892041{4}[source]
Only viewable if you have a Twitter account, which is less and less common these days.
15. cageface ◴[] No.41892076[source]
This is more or less where I’ve landed lately. There are some things I really like in Svelte and Solid but not enough to overcome the massive ecosystem advantage React has.
replies(1): >>41893701 #
16. dtj1123 ◴[] No.41893701{3}[source]
I never understood the ecosystem argument as applied to Svelte. Vanilla js libraries integrate with it pretty much perfectly, meaning you don't need a Svelte port of a given library. The ecosystem is effectively huge.
replies(1): >>41894135 #
17. ansc ◴[] No.41893765[source]
> 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.

replies(1): >>41894469 #
18. mkl ◴[] No.41893952{4}[source]
https://xcancel.com/SvelteSociety/status/1260209026563858432
19. cageface ◴[] No.41894135{4}[source]
There aren't very many good modern, maintained vanilla js libraries. But for just about anything I need in React I can find something polished and well supported that just works.
replies(1): >>41918633 #
20. DecoySalamander ◴[] No.41894469[source]
Could you elaborate on why it's dangerous? Aren't runes just proxies with some variables in them?
replies(1): >>41894532 #
21. ansc ◴[] No.41894532{3}[source]
Of course! I was very used to SPA, and the convenience of moving a rune/store to an external file meant it could be accessed anywhere (as the post said). With SSR however, if you’re not careful, you can easily leak data: https://github.com/sveltejs/kit/discussions/4339.
replies(1): >>41900930 #
22. ChocolateGod ◴[] No.41895080{3}[source]
I have no idea Apple was using Svelte, that's cool

Another notable example is Yahoo Finance, which is written in Svelte

https://finance.yahoo.com/

23. rofrol ◴[] No.41900930{4}[source]
Thanks. also this https://github.com/sveltejs/kit/discussions/4339#discussionc...
24. RadiozRadioz ◴[] No.41918633{5}[source]
I'm not sure I understand. What types of libraries? When I think of libraries, I think of ExpressJS, lodash, JQuery, left-pad, etc. There are absolute tonnes of vanilla JS libraries.

I've rarely used React, are you talking about React-specific libraries? I find it hard to believe that there are more maintained React libraries than vanilla JS libraries.

replies(3): >>41921606 #>>41921972 #>>41990991 #
25. keyserj ◴[] No.41921606{6}[source]
I don't have a strong opinion on the whole, but as someone who's been building a diagramming app for 2+ years, I've found react-flow to be the most solid free & open-source node-based diagram component, by far. At least in terms of quantity/quality of features and UX/DX. Though admittedly I haven't thoroughly looked at alternatives in about a year.

It basically singlehandedly convinced me that the ecosystem was worth going with react when I started my project, despite really enjoying svelte.

26. cageface ◴[] No.41921972{6}[source]
All those libraries also work in React of course. The only vanilla js libraries that don't work well with React are UI libraries that assume they can control the DOM. But I can't think of many of those I'd prefer to the many excellent React UI libraries.
27. v3ss0n ◴[] No.41943955[source]
HuggingFace https://github.com/gradio-app/gradio ChatUI , lots of AI applications UI are build with / ontop of svelte. https://github.com/huggingface/chat-ui

Ollama's OpenWebUI https://github.com/open-webui/open-webui

Cannot edit my previous answer i mentioned wrong page. , updated proper links

28. satvikpendem ◴[] No.41990991{6}[source]
Framer Motion, react-three-fiber, react dnd, just a few that come to mind.