Re:Svelte is the most beautiful web framework I've seen
by mfatica on Tuesday July 02, 2019 @12:47PM
(#20336901)
I think svelte compiling to native javascript is lightyears more understandable than whatever the hell react is doing
[ Parent
| on HN ]
Re:Svelte is the most beautiful web framework I've seen
by s_y_n_t_a_x on Tuesday July 02, 2019 @02:12PM
(#20337804)
I think it's the reverse. If you write pure functional components, React is very understandable. It's easily testable, you know that you'll have the same output if you pass it the same props. Svelte templates just take us back where we've been, with the twist of compiling the templates, which I believe some templating libraries already did.
Re:Svelte is the most beautiful web framework I've seen
by mfatica on Tuesday July 02, 2019 @02:46PM
(#20338169)
React conceptually is very understandable, but understanding what it's actually doing under the hood is not.
Re:Svelte is the most beautiful web framework I've seen
by s_y_n_t_a_x on Tuesday July 02, 2019 @03:10PM
(#20338385)
You can dive down and learn the inner workings, the same as you can dive down and learn how the svelte compiler works, but it's not needed for either one. Understanding the concept is more important.
Re:Svelte is the most beautiful web framework I've seen
by machiaweliczny on Wednesday July 03, 2019 @02:35PM
(#20347206)
It's only because of events implementation and async rendering. Writting preact clone is super easy.
Re:Svelte is the most beautiful web framework I've seen
by thiht on Tuesday July 02, 2019 @01:46PM
(#20337538)
> whatever the hell react is doing
Being JavaScript?
Re:Svelte is the most beautiful web framework I've seen
by shados on Tuesday July 02, 2019 @03:21PM
(#20338500)
I'm a huge React fanboy, but if you try and step through the React code with a debugger, we're kind of a far cry from the days of Backbone and even Angular. For the common mortal, it has to be treated as a black box. Fortunately, its fairly stable, so it's rare you have to care, but...
Re:Svelte is the most beautiful web framework I've seen
by acemarke on Tuesday July 02, 2019 @04:09PM
(#20338966)
Yeah, the ability to step into Backbone code and back out of it into my own code was one of the things I liked about Backbone.
That said, React's mental model is so powerful that I've almost never needed to actually debug into it to see what's going on. If you've got an issue, tracing the dataflow in your own code is generally sufficient. So, I'm okay treating it as a black box.
(Hiya, Shados!)