Earlier quoted context omitted.
Well you might like Hyperscript or Elm, those are two approaches that work quite well using simple function calls. The thing with JSX is introduces a syntax that is familiar to the rendered output (which is the status quo), and there's a relatively clear visual separation between the declarative and imperative parts; which is hard to enforce in pure JS.
The problem with JSX (and it's the same problem with all declarative languages) is you have no control over the control flow.
Svelte is the most beautiful web framework I've seen
161–170 of 210 posts
Re: Svelte is the most beautiful web framework I've seen
#162I 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.…
You still gain a lot of benefits from your component framework this way (composability, life cycle management, easy interop with the rest of the app). It’s more work that you wouldn’t want to do all the time, of course.
Re: Svelte is the most beautiful web framework I've seen
#163Earlier quoted context omitted.
The problem with JSX (and it's the same problem with all declarative languages) is you have no control over the control flow.
That's because JSX doesn't concern itself with control flow; it's not its job. Your framework has that job.
Re: Svelte is the most beautiful web framework I've seen
#164So 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! :)
That said, I don't think boring is about age, but about real-world exposure
Re: Svelte is the most beautiful web framework I've seen
#165Earlier quoted context omitted.
At a job I had years back, we built our application with Ractive, it was really nice to use.
I had a similar experience. I wish Ractive would have gained more traction; it was a good balance of "enough functionality that a web UI requires" and "simple enough to avoid cognitive overload and allowed for quick ramp up".
Re: Svelte is the most beautiful web framework I've seen
#166Earlier quoted context omitted.
If you update all the data why is this more efficient?
contents _can_ change, not _will_ change. So this approach should update fewer cells per update cycle.
You really have to profile the code to figure out what's expensive. Maybe there is no scaling wrt. the number of nodes that change because repainting/relayouting is more expensive than updating the DOM.
Re: Svelte is the most beautiful web framework I've seen
#167I 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 bet if those 100 rows aren't even in the viewport you can get a big perf boost by only rendering a subset and rendering more when the user scrolls.
We've gotten ~30x boost on our tables with 100s of rows by using a progressive rendering algorithm.
virtualdom - preact/react/vue/snabbdom e.t.c is usually fast for most things. you can diff about a million things under a 10ms timeframe. Rendering a million things is an entirely different ballgame.
Re: Svelte is the most beautiful web framework I've seen
#168Let the "soap box brigade" commence! I got introduced to Rich Harris via a podcast (not personally), but am a big fan of his perspective on JS. I think we can all agree that; if you don't like Svelte, then fine. If you love JSX/TSX - then great! If you're a Vue person, then awesome - its exactly what makes this community great - the diversity & innovation. Not the soap-boxing antics, polarised opinions & vilification…
> *"always bet on Javascript" I've been keeping all the modern javascript frameworks at arms distance, because I've always preferred to bet on HTML, for the client at least. That said, I've no issues with heavy reliance on JS on the developer machine, but I always prefer pages that can work without the reliance on JS. So, it seems opportune to ask: Is there a JS framework around that actually compiles to HTML and CSS…
Re: Svelte is the most beautiful web framework I've seen
#169Earlier quoted context omitted.
> Rails burned out in under 10 years It may not be the glory days, but Rail's is still going strong 13 years later. React, however, has reached a popularity many times larger than RoR ever did. https://trends.google.com/trends/explore?date=all&geo=US&q=r... There has never been a project (I can think of), other than the Linux kernel, with the resources that companies and developers have put behind React. > Do you rem…
So is Flex[0]. What's your point? It's not popular anymore and hundreds if not thousands of code bases are being converted from both of these technologies into something else. [0]: https://trends.google.com/trends/explore?date=all&geo=US&q=r...
Seriously? Adobe Flex was a closed-source and proprietary commercial offering capitalizing on the prior decade's popularity of Flash.
React is open source with a vast and robust ecosystem of even more open source to go along with it. It couldn't be more night & day.
Re: Svelte is the most beautiful web framework I've seen
#170Earlier quoted context omitted.
So is Flex[0]. What's your point? It's not popular anymore and hundreds if not thousands of code bases are being converted from both of these technologies into something else. [0]: https://trends.google.com/trends/explore?date=all&geo=US&q=r...
> What's your point? Seriously? Adobe Flex was a closed-source and proprietary commercial offering capitalizing on the prior decade's popularity of Flash. React is open source with a vast and robust ecosystem of even more open source to go along with it. It couldn't be more night & day.
That confirms it: you aren't old enough to remember Flex. It was open source.