Live data from Hacker News

Svelte is the most beautiful web framework I've seen

thefutureoftheweb.com

201–210 of 210 posts

Re: Svelte is the most beautiful web framework I've seen

#201

It does look great. I’m concerned though, few years ago I used to use rivets [1] for two-way data binding in html. It worked very well. Unfortunately, it’s abandoned. Same fate as coffeescript, backbonejs, etc. Now I primarily use react. Vue looks great, but I don’t want to introduce yet another framework. I could use some insights/view points from hn. I don’t feel using/learning the now-abandoned frameworks is usele…

Rivets is kinda simiar to Vuejs(although has some pain points). I have code that automatically ports templates to React with jscodeshift. I was able to port "logic" to MobX easily.

Re: Svelte is the most beautiful web framework I've seen

#202

Earlier quoted context omitted.

Not sure how that's a preference without any further context about how you plan on writing the rest of the client. For all we know, both of those functions return .

> For all we know, both of those functions return . No.

Well, that's kind of my point. Making a superficial aesthetic change doesn't explain what you're actually preferring over JSX. Nor do you seem interested in explaining it.

Re: Svelte is the most beautiful web framework I've seen

#203
post #54

I watched Rich Harris's "Rethinking reactivity" presentation ( https://www.youtube.com/watch?v=AdNJ3fydeao ) and was incredibly impressed. Has anyone with React/Vue experience used Svelte for a significant project? I'd love to hear about your experience with it.

Yeah - I wrote https://www.beyonk.com in Nuxt first, and I've now rewritten it in Svelte (Sapper). There are some things which weren't ready when I started, but I worked around them. The overall experience is that Svelte results in faster pages, less code, more predictability, faster builds... overall, it's a better experience.

Nice. I like the SSR and that subsequent page loads are basically just a 5KB fetch of pure content in JSON.

But if I go to a content page (eg. https://www.beyonk.com/uk/6Gb_Kj/guided-ascent-of-curved-rid...), I see that the response is a 286KB blob, mostly consisting of CSS. If I reload the page, I redownload that 286KB blob. Wouldn't it be better to serve the CSS separately so it can be cached across sessions?

Re: Svelte is the most beautiful web framework I've seen

#204

Earlier quoted context omitted.

> For all we know, both of those functions return . No.

Well, that's kind of my point. Making a superficial aesthetic change doesn't explain what you're actually preferring over JSX. Nor do you seem interested in explaining it.

> Nor do you seem interested in explaining it.

The lack of questions and the relentless downvoting makes me believe nobody's interested in hearing my explanations.

Re: Svelte is the most beautiful web framework I've seen

#205
post #131

Earlier quoted context omitted.

I’ve been holding off from React for a long time, but also after reading the “boring technology”, I came to realize React is in fact - here to stay.

It'll be gone in 5 years. It's getting too big and too slow. Also, the react team managed to add hooks and useEffect in a way that makes it very easy to accidentally send your app into an infinite loop and not know why.

Hooks definitely need to be deeply learned, and has one of the steeper learning curves in React. But at its core, its solving a hard problem (lifecycle side-effects), in a way that is more functional, and produces more maintainable code. Thats a fair trade-off imho. And honestly, once you understand them, the infinite loops are deterministic and understandable.

If you want a component-based view library that is written in js, and you are happy to take on the task of assembling a build-system, styling system, routing and of course state-management, I can't see much of an architectural improvement you could make over React.

If you want batteries included - go with Vue.

If you want the Ruby/spring opinion and batteries included go with Ember.

Svelte looks kinda cool. But it seems to sit deep in the browser spec, and in my NAIVE opinion, it doesn't seem hold the component abstraction as something even valuable. It just wants you to script away. Which, is just movement within a trade-off space - if it suits you go for it.

Re: Svelte is the most beautiful web framework I've seen

#206

So I just read about "Choosing Boring Technology" before coming into this thread. I guess React.js is the boring technology (already 5-6 years) one and Svelte is the new and exiting one! :)

I went through the svelte examples and I was exited until I reached the If block example: {#if user.loggedIn} Log out {/if} To me such template language is a huge step back from JSX. JSX is JavaScript, thus you get the full power of the language (JS/TS) with the full support from your editor (type checking, auto-completion, etc.).

Yeah I think I basically agree. Being able to simply write idiomatic javascript to compose elements is just so awesome.

Though I would assume Editor support of Svelte can/is being built.

Re: Svelte is the most beautiful web framework I've seen

#208

So I just read about "Choosing Boring Technology" before coming into this thread. I guess React.js is the boring technology (already 5-6 years) one and Svelte is the new and exiting one! :)

My daytime job isn't primarily programming anymore, and frontend development has never even been my job. I used to do embedded and backend development, and am now in more of a ops/architect/automation consultant (freelance). I still need to code on a regular basis, and Go and Python are my go-to languages these days.

On a regular basis, I encounter the need for a GUI for some API or backend I write, so I tried to get into a more modern Javascript eco system. I have created websites and even full-on forum software in a long forgotten past, so I have some basic old-school webdev and basic Javascript knowledge (from back when directly manipulating the DOM was still the way to go). So take this as a bit of an outsider look on things, who is confronted with full-time Javascript developers on a daily basis.

When I started looking into react, vue, ... it always overwhelmed me. Whatever I started doing, according to someone, it's bad practice and should just do Y instead of X. Nobody seems to agree on best practices, and there seems to be a whole lot of 'magic' going on in all those frameworks, and knowing where to start is an absolute mess. It's confusing as hell.

Now I quickly went through the tutorial and examples on the Svelte site and it felt pretty simple, I can reason with how it works behind the scenes, and can read the generated Javascript to verify that that's really what's going on. It makes the whole thing seem more manageable in my head.

As far as "the new exciting one" goes - what appeals most to me personally is its simplicity. One of the reasons Go also appealed to me. It was exciting for a while, but ended up being the boring 'it just works' solution which completely replaced C and C++ in my life (that's not a jab at these languages, they have their uses, I just don't need them anymore)

Re: Svelte is the most beautiful web framework I've seen

#209

So I just read about "Choosing Boring Technology" before coming into this thread. I guess React.js is the boring technology (already 5-6 years) one and Svelte is the new and exiting one! :)

My daytime job isn't primarily programming anymore, and frontend development has never even been my job. I used to do embedded and backend development, and am now in more of a ops/architect/automation consultant (freelance). I still need to code on a regular basis, and Go and Python are my go-to languages these days. On a regular basis, I encounter the need for a GUI for some API or backend I write, so I tried to get…

I've been doing web development professionally for two decades but I feel exactly the same way. It couldn't be any simpler!

Re: Svelte is the most beautiful web framework I've seen

#210

Earlier quoted context omitted.

It'll be gone in 5 years. It's getting too big and too slow. Also, the react team managed to add hooks and useEffect in a way that makes it very easy to accidentally send your app into an infinite loop and not know why.

Hooks definitely need to be deeply learned, and has one of the steeper learning curves in React. But at its core, its solving a hard problem (lifecycle side-effects), in a way that is more functional, and produces more maintainable code. Thats a fair trade-off imho. And honestly, once you understand them, the infinite loops are deterministic and understandable. If you want a component-based view library that is writt…

The component abstraction is primary with Svelte. Each file is a component and only one component. This means the only ceremony you need to create a component is to create a new file. It's a perfect solution in my opinion.
Post reply on HN