4 ms·
Slightly off-topic, but has any of those who dislike hooks for the added magic seen Svelte.js version 3? It is ridden with magic. Top-level variables in the <sc
by azangru 8y ago
Slightly off-topic, but has any of those who dislike hooks for the added magic seen Svelte.js version 3? It is ridden with magic. Top-level variables in the <script> block are "observable" in the Vue sense of the word and accessible in the <template> block; so whenever they change, the relevant parts of the template get updated. The creator of Svelte says that it's very intuitive, and that developer experience is great. I wonder what your take on that will be.
- Tade0 8y agoTo be fair Svelte does have the word "magical" in its motto. I personally don't see it as anymore magical than MobX - it's just taking it a step further by taking advantage of the fact that bindings are created at compile time. This is consistent with how things are generally done in this framework.
- averge 8y agoNot a fan of that non-JS svelte magic or the direction these frameworks are going. Fewer lines of code, true, but at the expense of understandability. I just want to get my work done, not learn yet another flavor of the day with non-intuitive implicit behaviors.
- azangru 8y ago> I just want to get my work done I am generally with you, but the purpose of these frameworks _is_, first and foremost, to get work done (Svelte's creator Rich Harris says that it makes it possible to write UI components very fast). I love it when the code is explicit and when the framework does not introduce any weird shenanigans (Backbone, where are you? I am missing you), but this explicitness comes at a cost of having to write boilerplate.
- averge 8y ago> it makes it possible to write UI components very fast ...until you happen to code something that doesn't follow the magical convention and everything breaks for unknown reasons. Then it becomes difficult - or impossible - to debug.