Isn'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…
As far as I understand, ReactJS is a tightly weaved 40kB chunk of code which will be delivered to the browser no matter how ferociously you shake the tree.
Svelte – A UI framework that compiles into tiny standalone JavaScript modules
61–70 of 236 posts
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#62I 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…
checkout css-modules! https://github.com/css-modules/css-modules
I've tried a few solutions to add styles to React components but they all had something that didn't make them see as the perfect solution.
This looks very good, I've never tried it before.
Thanks.
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#63I 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…
I think the name will work out just fine (witness MySQL and PostgreSQL). From looking at the docs, the two-way binding seems entirely optional and I can't find anything that would prevent a developer from using a redux model of state management. I've got framework fatigue, too, but on the surface this project seems to embody the best of what I love: a tiny API, little magic, and getting out of the way.
As for the name sure, but now there's a lot of competition between frameworks, and you want to get all help you can marketing-wise. I might be shallow, but I've not looked at projects a lot of times just because I didn't like the name. I just have no time to make informed decisions, there's too much stuff to look at. I'll see if besides the concept/purpose I like the logo and name a lot of times.
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#64Earlier quoted context omitted.
Taken to its extreme, that argues for writing everything in assembly language. React's virtual DOM diffing makes components more readable than the previous style of writing code to explicitly manipulate the DOM and totally hides what's really happening. However, we trust that it's going to do the right thing, just as we trust that the JavaScript engine will do the right thing when it JITs and interprets our code.
The point is, don't take things to the extreme :) It's not that people said "Everything is bad, do assembly". It's just that people identified 2WB as problematic and you just shouldn't do that one thing.
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#65I don't see the point of yet another framework here.
The "no dependencies" argument seems to fall down for me, since it would seem to me that they would need to duplicate a lot of code for state management and rendering, bloating the code for anything more complex.
And if there's some clever tree shaking or whatever going on, than I don't see the point as opposed to just including another JS file...
I couldn't find any explanation of what's so different here, worthy of creating another framework for it. Would love to be enlightened!
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#66Earlier quoted context omitted.
Lots of elderly programmers might want to check out Svelte.
Lots of people have some issues with their eyesight or have problems reading low-contrast text, not just elderly programmers.
What a nightmare being a programmer who has poor eyesight. My eyes kill me after a whole day of looking at code and I have 10/10.
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#67I 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…
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 me. Unfortunately, a compiler wouldn't be able to generate a good picture of the structure of a JSX component – because it's 'just JS' it resists the kind of meaningful static analysis that Svelte can take advantage of. I'd love to be proven wrong, but sadly I just don't think any JSX-based framework will ever be able to fully embrace these techniques.
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#68https://svelte.technology/guide For how it actually looks. Interestingly, it shares most similarities to vue. I guess vue is winning mindshare.
> # Getting started > 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
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#69Vue.js has single file components [1] and template precompilation [2] (or optionally JSX support, which is basically a precompiled template). I don't see the point of yet another framework here. The "no dependencies" argument seems to fall down for me, since it would seem to me that they would need to duplicate a lot of code for state management and rendering, bloating the code for anything more complex. And if there…
if it wasn't for projects like that we'd be coding in some feature rich ims/cobol framework.
Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules
#70Vue.js has single file components [1] and template precompilation [2] (or optionally JSX support, which is basically a precompiled template). I don't see the point of yet another framework here. The "no dependencies" argument seems to fall down for me, since it would seem to me that they would need to duplicate a lot of code for state management and rendering, bloating the code for anything more complex. And if there…