6 ms·
I think svelte compiling to native javascript is lightyears more understandable than whatever the hell react is doing
by mfatica 7y ago
I think svelte compiling to native javascript is lightyears more understandable than whatever the hell react is doing
- thiht 7y ago> whatever the hell react is doing Being JavaScript?
- shados 7y agoI'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...
- acemarke 7y agoYeah, 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!)
- s_y_n_t_a_x 7y agoI 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.
- mfatica 7y agoReact conceptually is very understandable, but understanding what it's actually doing under the hood is not.
- s_y_n_t_a_x 7y agoYou 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.
- machiaweliczny 7y agoIt's only because of events implementation and async rendering. Writting preact clone is super easy.