Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The idea behind svelte is neat, i wonder though what the impact of its approach will be on a developers ability to understand what is happening under the hood. In my experience opaque abstraction layers can really hamper your ability to properly understand what is going on. Traditionally the JS ecosystem has been a frontrunner in this area (e.g. sourcemaps). But I have had terrible experiences in the Java ecosystem, with all its aspect weaving and annotation magic.


I think svelte compiling to native javascript is lightyears more understandable than whatever the hell react is doing


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.


React conceptually is very understandable, but understanding what it's actually doing under the hood is not.


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.


It's only because of events implementation and async rendering. Writting preact clone is super easy.


> whatever the hell react is doing

Being JavaScript?


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...


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!)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: