Love 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…
Redux fixes two way binding by forcing the developer to emulate it using such a convoluted mechanism that there's no way to see that it's still broken; great job, FB rockstars!
Svelte – A UI framework that compiles into tiny standalone JavaScript modules
41–50 of 236 posts
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#42Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#43https://svelte.technology/guide For how it actually looks. Interestingly, it shares most similarities to vue. I guess vue is winning mindshare.
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#44Isn't the problem of including only the code the component actually needs already solved with dead code elimination? So the framework authors can include new features but as long as your component doesn't use them the code for those feature does not end up in the final bundle you serve to the user. I sure am missing something here because the author of Svelte is actually also the author of rollup.js [1] which does ex…
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#45Earlier quoted context omitted.
React also uses curly braces for interpolation, not that different.
I would imagine that he meant the control-structure stuff like {#if}, rather than pure JS.
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#46The 'Mustaches' bit killed it for me, but up until then I was enjoying the simplicity of the API. I like React (and React-like implementations) because of being able to use JS to build up a view
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#47Earlier 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…
Tried to click the link, but the REPL is apparently so advanced that it won't even display the source code in Firefox.
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#48Isn't the problem of including only the code the component actually needs already solved with dead code elimination? So the framework authors can include new features but as long as your component doesn't use them the code for those feature does not end up in the final bundle you serve to the user. I sure am missing something here because the author of Svelte is actually also the author of rollup.js [1] which does ex…
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#49The 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 if you like scoped CSS, since it's already established and it's a good project.
I wonder if these ideas can be somehow applied to React, doing precompiling on React components, so that one can continue taking advantage of all freely available React components out there, and keep using Redux.
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#50https://svelte.technology/guide For how it actually looks. Interestingly, it shares most similarities to vue. I guess vue is winning mindshare.
> Normally, this is the part where the instructions would tell you to add a tag to your page or install something from npm. But because Svelte runs at build time, it works a little bit differently.
> First, install the CLI:
> npm install -g svelte-cli
They might want to change their opening