closes tab
Svelte – A UI framework that compiles into tiny standalone JavaScript modules
91–100 of 236 posts
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#92Earlier quoted context omitted.
Handlebars templates have a runtime dependency (even when precompiled). Svelte does not. Also, a precompiled Handlebars template is just a function for outputting an HTML string (with a runtime dependency). By comparison, the compiled Svelte output is a dependency-free JavaScript module for a dynamic view, which knows how (and when) to granularly update the browser DOM in response to state changes. It's unprecedented…
Svelte has a runtime dependency too, it's just bundled into the output. Everytime I've used handlebars I've bundled the runtime into my final application file. But I do it myself so it only gets bundled once rather than N times like it would be for svelte.
update () {
text1.data = root.name
}
This is the entire DOM manipulation code for this component.There is no runtime library. The trick here is that the generated code is aware of exactly what DOM updates are needed. Instead of a large, general-purpose reconciliator like React's, you have specialized code for changing the DOM, generated from your templates.
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#93Love it. I think the most discussion-worthy quote I found in the docs is this: > It's currently fashionable to avoid two-way binding on the grounds that it creates all sorts of hard-to-debug problems and slows your application down, and that a one-way top-down data flow is 'easier to reason about'. This is in fact high grade nonsense. It's true that two-way binding done badly has all sorts of issues, and that very la…
I also think it's ignorant to say it's fashionable to avoid two way binding, I've seen teams greatly benefit from avoiding it, teams with less experienced devs and devs who I've previously seen write terrible code. Maybe now two way binding would be easier for them, though I don't know; I'm unlikely to suggest they 180 on tech that has made them much more successful.
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#94Where is this being used right now in production?
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#95Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#96I think now the community has settled on the Component based development, especially with JSX templates.
What we need are multiple react-kernels implementations. I see React community providing component API specs. Similar to Linux distros, we should have API compatible implementations, where application code can run on multiple kernels without any changes. We are now seeing multiple react-shim layer implementation - Preact [0], Inferno [1].
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#97I love the ideas. The only other thing I like is CSS scoping, though. I think that CSS scoping is a problem in React, and current ideas on how to implement that in React are absolutely horrible IMHO. Two-way binding is a step back I think, I don't love the name (lots of people will judge a new technology by its name), and the thought of introducing yet another framework is a nightmare. I'd personally go with Polymer…
> Two-way binding is a step back I think You don't have to use it – its effects are restricted to the subtree where you've explicitly opted in to it. I've personally found it to be a huge timesaver, and would never go back to a world where I didn't have the option of using it. But you're in no way forced into it. > I wonder if these ideas can be somehow applied to React A lot of people have wondered that, including m…
You did an awesome job.
I'm really scared about trying out yet another framework since I've tried pretty much all of them before settling on React, (and I guess a lot of people will be, too, since there's a new one every couple of months) but I'll try this weekend.
Thanks!
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#98> It's basically as fast as vanilla JS, which makes sense because it is vanilla JS – just vanilla JS that you didn't have to write. What kind of logic are they using here? Isn't any javascript just vanilla JS?
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#99http://dayssincelastjavascriptframework.com/