Live data from Hacker News

Svelte – A UI framework that compiles into tiny standalone JavaScript modules

svelte.technology

81–90 of 236 posts

Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules

#81

Earlier quoted context omitted.

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

To what?

I like the way the documentation is written - but I think they might be referring to (paraphrasing because I'm on a phone)

> In other frameworks, you'd have to install something with npm...

>Run npm install -g svelte-cli

Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules

#82

This looks nice: a Javascript framework for expressing _concepts_ that compiles down to vanilla JS. It looks like it ships a lot less code to the user. From the project's first [blog post]( https://svelte.technology/blog/frameworks-without-the-framew... ): > The Svelte implementation of TodoMVC weighs 3.6kb zipped. For comparison, React plus ReactDOM without any app code weighs about 45kb zipped. It takes about 10x a…

I didn't study the thing, but the first question that comes to my mind is: if each component is rendered as a self contained piece of vanilla js, isn't the size of an app with lots of components going to increase much faster than with the library approach? A complete library by itself can be pretty big, but it stays the same size no matter how many components you add.

The biggest problem with web apps today is the initial load time, not the total size of the app. If you can't render the first page the user lands on without serving a large framework, you're stuck.

But yes, an app built entirely out of standalone components would eventually overtake the total size of an app built using a more conventional framework. (By the time you get there, your app is probably already too big anyway, and you should be code-splitting.) We're going to add a compiler mode that addresses that very soon by deduping some code within an app.

Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules

#83

That seems quite amazing, especially the todo example being over 10 times smaller than the React one. Are there any drawbacks to this approach?

To be fair, there are today numerous frameworks that are 10 times smaller than react and can do roughly the same things.

Drawbacks would be maturity, community size, template closed expresiveness and not typescript friendly. Nothing too major.

Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules

#84
post #8

A side note about that website. Thin and Extra-Thin fonts have no place in web design (there are some exceptions in huge title text). They are an unnecessary burden for people with limited eyesight and elderly people[1]. Even for me, on my 1366x768 screen (which is still the single most common resolution for cheap notebooks, dear HiDPI web designers[2]), the bullet text is hardly readable, the copyright line is compl…

Create an issue here: https://github.com/sveltejs/svelte.technology or submit a pull request

Not sure why you were downvoted, I think it's entirely reasonable to bring up his concerns in an issue regardless of whether they are eventually implemented.

Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules

#85

Earlier quoted context omitted.

To what?

> or install something from npm > installs something from npm

Ha, touché. We'll think of something a little bit more logical. Thanks

Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules

#86
post #76

Earlier quoted context omitted.

If u don't like it you don't have to use it. And redux is nothing like that. It reduces a tonne of bugs among a lot of not so smart developers or beginners.

> If u don't like it you don't have to use it Don't write things like that, it always reads like "Noone cares about your opinion, so stop using X and also stop writing about how bad X is"

Wow. How can someone even understand it like that! No way. I actually meant what I wrote and im not really worried about what someone else might think about my comment. Cause it's way way softer.

Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules

#89

Earlier quoted context omitted.

> or install something from npm > installs something from npm

Ha, touché. We'll think of something a little bit more logical. Thanks

No worries, I understood the meaning even if the wording made me chuckle.

Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules

#90
post #29

Earlier quoted context omitted.

Trying to avoid boilerplate is in my experience not about laziness - especially when you consider the extreme lengths a lot of developers will go to to eliminate duplication and boilerplate from their codebases. Copying a Redux reducer that implements a standard set of CRUD actions is lazier in my mind than trying to abstract common patterns away. For me at least, the reason boilerplate bothers me so much is that it…

"the reason boilerplate bothers me so much is that it impacts the readability of my code" But if you hide boilerplate you not really improve readability. Not seeing what is really happening just creates the illusion of readability.

If the thing that I'm abstracting is routine, and unrelated to the business problem I'm solving, I don't need to know what's happening (at least in the sense of me or someone else coming back to read the code later). I don't need to know how an HTTP server, or the particulars of an AJAX request work most of the time.
Post reply on HN