Live data from Hacker News

Svelte is the most beautiful web framework I've seen

thefutureoftheweb.com

71–80 of 210 posts

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

#71

Interesting that the custom element appears to just take a single JavaScript object as a parameter: In JSX this would be either: or: This is almost as ergonomic as JSX except for attributes like checked where the value is omitted. It might encourage some refactoring, compared with React, because the thought of putting attributes in a variable and adding them as a spread might occur more often when seeing an object be…

Am I the only one who would rather write the following instead of JSX?

    Board.draw(game)
or

    drawBoard(game)

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

#72
post #37

I have a table of 100 rows x 10 columns mostly of numbers which change 10 times a second (think trading). The source data sits in an array of objects. On each update, I need to update the table cells with the latest values from the source array. The content of each cell can change, possibly it's css class too (from red it become blue for example). I'm using Vue/Bootstrap-Vue table at the moment, but it's quite slow.…

It's likely given Svelte's performance: https://m.youtube.com/watch?t=1080

I think your link is broken. What's the name of the video?

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

#74
How would it scale for a bigger app ? Shipping a library with the app like react creates poor performance for small components for sure, but abstractions must become worth it beyond a certain scale no ? I guess the compiler could also create abstractions when it becomes worth using them ?

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

#75
post #16
post #5

Earlier quoted context omitted.

Using JS ternaries for conditional rendering doesn't feel natural to me at all

Using {#if} or v-if or whatever feels even less natural -- especially when these template languages are hyped as being "logicless".

v-if feels quite natural to me, and easy to read as well.

I think it's a matter of personal taste.

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

#76
post #74

How would it scale for a bigger app ? Shipping a library with the app like react creates poor performance for small components for sure, but abstractions must become worth it beyond a certain scale no ? I guess the compiler could also create abstractions when it becomes worth using them ?

So how did you construct this claim that React delivers poor performance for small components? Browsing hacker news?

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

#77
post #55

I have a table of 100 rows x 10 columns mostly of numbers which change 10 times a second (think trading). The source data sits in an array of objects. On each update, I need to update the table cells with the latest values from the source array. The content of each cell can change, possibly it's css class too (from red it become blue for example). I'm using Vue/Bootstrap-Vue table at the moment, but it's quite slow.…

I have pretty much exactly this use case (think trading!). I wrote a couple of hundred lines of vanilla JS. It works fine.

Exactly. Stuff like this is extremely simple to write in vanilla js, with a pointer to each of the dom objects you need to interact with. There's no point in using a framework (but of course you can encapsulate your vanilla js in a component to interface with whatever framework you're using).

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

#78

I have a table of 100 rows x 10 columns mostly of numbers which change 10 times a second (think trading). The source data sits in an array of objects. On each update, I need to update the table cells with the latest values from the source array. The content of each cell can change, possibly it's css class too (from red it become blue for example). I'm using Vue/Bootstrap-Vue table at the moment, but it's quite slow.…

I had a similar issue on an app. I solved it with an event bus.

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

#79
post #37

Earlier quoted context omitted.

It's likely given Svelte's performance: https://m.youtube.com/watch?t=1080

I think your link is broken. What's the name of the video?

I'm assuming op was trying to link to this based off the timestamp https://www.youtube.com/watch?v=AdNJ3fydeao&t=1080

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

#80
post #8

I like playing with different web frameworks, but the article had a bad hype:information ratio, so I googled the Svelte homepage, which I think is really well presented: https://svelte.dev/

I get a 404

Go directly to https://svelte-website-mrf26sti4q-uc.a.run.app/ and it seems to be working fine.
Post reply on HN